MCPcopy Create free account
hub / github.com/TanStack/devtools / App

Function App

examples/react/a11y-devtools/src/App.tsx:6–167  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4 * Example app with intentional accessibility issues for testing the A11y devtools plugin
5 */
6export default function App() {
7 const [showModal, setShowModal] = useState(false)
8
9 return (
10 <div style={{ padding: '20px', fontFamily: 'system-ui, sans-serif' }}>
11 <h1>A11y Devtools Demo</h1>
12 <p>
13 This page contains intentional accessibility issues to demonstrate the
14 A11y devtools plugin. Open the devtools panel and click "Run Audit" to
15 see the issues.
16 </p>
17
18 <section style={{ marginTop: '24px' }}>
19 <h2>Accessibility Issues Demo</h2>
20
21 {/* Issue: Image without alt text */}
22 <div style={{ marginBottom: '16px' }}>
23 <h3>1. Image without alt text</h3>
24 <img
25 src="https://via.placeholder.com/150"
26 width={150}
27 height={150}
28 style={{ border: '1px solid #ccc' }}
29 />
30 </div>
31
32 {/* Issue: Button without accessible name */}
33 <div style={{ marginBottom: '16px' }}>
34 <h3>2. Button without accessible name</h3>
35 <button style={{ width: '40px', height: '40px', fontSize: '20px' }}>
36 <span aria-hidden="true">×</span>
37 </button>
38 </div>
39
40 {/* Issue: Form input without label */}
41 <div style={{ marginBottom: '16px' }}>
42 <h3>3. Form input without label</h3>
43 <input
44 type="text"
45 placeholder="Enter your name"
46 style={{ padding: '8px' }}
47 />
48 </div>
49
50 {/* Issue: Low color contrast */}
51 <div style={{ marginBottom: '16px' }}>
52 <h3>4. Low color contrast</h3>
53 <p style={{ color: '#aaa', backgroundColor: '#fff' }}>
54 This text has poor color contrast and may be hard to read.
55 </p>
56 </div>
57
58 {/* Issue: Link without discernible text */}
59 <div style={{ marginBottom: '16px' }}>
60 <h3>5. Link without discernible text</h3>
61 <a href="https://example.com" style={{ display: 'inline-block' }}>
62 <img src="https://via.placeholder.com/24" width={24} height={24} />
63 </a>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected