-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
247 lines (236 loc) · 11.1 KB
/
index.html
File metadata and controls
247 lines (236 loc) · 11.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Accessibility as User Stories</title>
<style>
:root {
--bg: #ffffff;
--text: #1f1f1f;
--muted: #5a5a5a;
--heading: #111111;
--accent: #c96442;
--rule: #e5e5e5;
--code-bg: #f4f3ee;
--code-text: #2b2b2b;
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #1f1e1d;
--text: #e8e6e1;
--muted: #a8a49b;
--heading: #f5f3ef;
--accent: #d97757;
--rule: #3a3836;
--code-bg: #2b2a28;
--code-text: #e8e6e1;
}
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
font-size: 17px;
line-height: 1.6;
color: var(--text);
background: var(--bg);
margin: 0;
padding: 2.5rem 1.5rem 4rem;
}
main {
max-width: 46rem;
margin: 0 auto;
}
h1 {
font-size: 2rem;
font-weight: 600;
color: var(--heading);
margin: 0 0 2rem;
letter-spacing: -0.01em;
}
h2 {
font-size: 1.125rem;
font-weight: 600;
color: var(--heading);
margin: 2.5rem 0 0.75rem;
letter-spacing: -0.005em;
}
h2:first-of-type { margin-top: 0; }
p.lede {
color: var(--muted);
margin: 0 0 2.5rem;
}
ul {
margin: 0 0 1rem;
padding-left: 1.4rem;
}
li {
margin-bottom: 0.4rem;
}
li ul {
margin-top: 0.4rem;
margin-bottom: 0.4rem;
}
li::marker {
color: var(--muted);
}
code {
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
font-size: 0.88em;
background: var(--code-bg);
color: var(--code-text);
padding: 0.1em 0.35em;
border-radius: 4px;
}
hr {
border: 0;
border-top: 1px solid var(--rule);
margin: 2rem 0;
}
a { color: var(--accent); }
</style>
</head>
<body>
<main>
<h1>Accessibility as user stories</h1>
<figure role="img" aria-label="Common disabilities and impairments: Visual, Hearing, Motor, and Cognitive" style="margin:0 0 2rem; text-align:center;">
<svg viewBox="0 0 600 160" xmlns="http://www.w3.org/2000/svg" style="max-width:520px; width:100%;">
<!-- Visual -->
<g transform="translate(75,70)">
<circle r="50" fill="#e8edf3"/>
<ellipse cx="0" cy="0" rx="26" ry="18" fill="none" stroke="#1a3a5c" stroke-width="3.5"/>
<circle cx="0" cy="0" r="9" fill="#4a9cc7"/>
<circle cx="0" cy="0" r="4" fill="#1a3a5c"/>
<text y="72" text-anchor="middle" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif" font-size="16" font-weight="600" fill="#1a3a5c">Visual</text>
</g>
<!-- Hearing -->
<g transform="translate(225,70)">
<circle r="50" fill="#e8edf3"/>
<path d="M-8 -18 Q-18 -18 -18 -4 Q-18 10 -8 16 Q-6 17 -6 20 Q-6 24 -10 26" fill="none" stroke="#1a3a5c" stroke-width="3.5" stroke-linecap="round"/>
<path d="M-4 -12 Q-10 -10 -10 -2 Q-10 8 -4 12" fill="none" stroke="#4a9cc7" stroke-width="2.5" stroke-linecap="round"/>
<path d="M4 -16 Q14 -10 14 0 Q14 10 4 16" fill="none" stroke="#4a9cc7" stroke-width="3" stroke-linecap="round"/>
<path d="M10 -22 Q24 -14 24 0 Q24 14 10 22" fill="none" stroke="#4a9cc7" stroke-width="3" stroke-linecap="round"/>
<text y="72" text-anchor="middle" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif" font-size="16" font-weight="600" fill="#1a3a5c">Hearing</text>
</g>
<!-- Motor -->
<g transform="translate(375,70)">
<circle r="50" fill="#e8edf3"/>
<circle cx="-2" cy="-22" r="6" fill="#1a3a5c"/>
<path d="M-2 -16 L-2 4 L-14 14" stroke="#1a3a5c" stroke-width="3.5" stroke-linecap="round" fill="none"/>
<path d="M-2 0 L10 -6" stroke="#1a3a5c" stroke-width="3.5" stroke-linecap="round" fill="none"/>
<circle cx="6" cy="16" r="14" fill="none" stroke="#4a9cc7" stroke-width="3"/>
<circle cx="6" cy="16" r="5" fill="#4a9cc7"/>
<text y="72" text-anchor="middle" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif" font-size="16" font-weight="600" fill="#1a3a5c">Motor</text>
</g>
<!-- Cognitive -->
<g transform="translate(525,70)">
<circle r="50" fill="#e8edf3"/>
<path d="M6 -24 Q-18 -24 -18 -8 Q-18 8 -18 14 Q-18 24 -6 24 L6 24 L6 -24 Z" fill="#1a3a5c"/>
<path d="M6 -24 Q20 -24 20 -8 Q20 8 20 14 Q20 24 6 24 L6 24 L6 -24 Z" fill="#4a9cc7"/>
<ellipse cx="12" cy="-4" rx="5" ry="5" fill="#e8edf3"/>
<text y="72" text-anchor="middle" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif" font-size="16" font-weight="600" fill="#1a3a5c">Cognitive</text>
</g>
</svg>
</figure>
<p class="lede">As a user...</p>
<h2>I understand the page purpose and know where I am in that context</h2>
<ul>
<li>Tab titles are descriptive and unique</li>
<li>The document has a <code>lang</code> attribute so the screen reader uses the right pronunciation</li>
<li>There is one clear <code><h1></code> that matches the page's purpose</li>
<li>In a single-page app, route changes update the title and announce the new page to assistive tech</li>
<li>Navigation is consistent — the same elements appear in the same order across pages</li>
<li>The current page or section is programmatically indicated in navigation, not just styled</li>
<li>Focus is visible and follows a logical order</li>
<li>Keyboard navigation is predictable and correct</li>
<li>Unique context for table cells</li>
</ul>
<h2>I can jump to something quickly</h2>
<ul>
<li>"Skip to main content" link is the first focusable element</li>
<li>A single <code><main></code> landmark</li>
<li><code>banner</code> (header), <code>nav</code>, <code>complementary</code> (aside), and <code>contentinfo</code> (footer) landmarks are present and correctly used</li>
<li>If there are multiple navs or regions, each has a unique accessible name</li>
<li>Heading hierarchy is logical and sequential (h1 → h2 → h3, no skipped levels)</li>
</ul>
<h2>I can find where I'm going next</h2>
<ul>
<li>A link is a link and goes somewhere (navigates to a destination)</li>
<li>A button is a button and does something (triggers an action) — AI-generated interfaces often get this wrong; add a lint rule</li>
<li>Link text is meaningful on its own — not "Click here" or "Read more" without context</li>
<li>External links, downloads, and links that open in a new tab are announced as such</li>
<li>The back button and browser history behave as expected, including after SPA route changes</li>
</ul>
<h2>I can interact with everything</h2>
<ul>
<li>Every interactive element is reachable and operable by keyboard alone</li>
<li>Every interactive element has a clear, concise accessible name that describes its action ("Save draft," not "Submit")</li>
<li>The accessible name matches the visible label so voice-control users can say what they see</li>
<li>Icon-only buttons have an accessible label</li>
<li>Custom controls (sliders, date pickers, accordions, menus) behave like their native equivalents</li>
<li>Form submission works predictably — I know what will happen when I press a button</li>
<li>Drag-and-drop has a keyboard or single-pointer alternative</li>
<li>I have enough time to complete a task — session timeouts warn me and let me extend</li>
</ul>
<h2>I can understand what is presented</h2>
<ul>
<li>Text uses clear, simple language, and terminology is consistent across the site</li>
<li>Color contrast meets guidelines for normal text and large text</li>
<li>Information is not conveyed by color alone</li>
<li>Font sizes are consistent</li>
<li>Button sizes meet minimum target size</li>
<li>Content reflows without requiring both horizontal and vertical scrolling</li>
<li>Screen responds appropriately for zoom settings, up to 200% without loss of content</li>
<li>Screen layout matches my language defaults (e.g., right-to-left for Arabic)</li>
<li>Calendar options match my language defaults</li>
<li>Lists are marked up as lists; tables are marked up as tables with proper headers and captions</li>
</ul>
<h2>I can understand media</h2>
<ul>
<li>Informative images have alt-text that conveys their purpose, not just their appearance</li>
<li>Decorative images have empty alt so they are ignored by screen readers</li>
<li>Complex images (charts, infographics, diagrams) have a longer description nearby or linked</li>
<li>Text embedded in images is avoided, or the same text is available in the alt or page content</li>
<li>Video does not autoplay for more than 3 seconds without controls
<ul>
<li>Video controls exist (stop, start, change playback speed)</li>
</ul>
</li>
<li>I can choose to see captions, including language options when available</li>
<li>Audio descriptions are available for video content that relies on visuals to convey meaning</li>
<li>No flashing content above the 3-flashes-per-second threshold without a warning — this prevents seizures</li>
</ul>
<h2>I know what information to put in a form</h2>
<ul>
<li>Every input has a visible, programmatically associated label</li>
<li>Required fields are clearly identified — not by color or asterisk alone</li>
<li>Input purpose is set using <code>autocomplete</code> and appropriate input types (<code>type=email</code>, <code>type=tel</code>, etc.)</li>
<li>Instructions and formatting hints appear before the input, not only after an error</li>
<li>Related fields are grouped with <code><fieldset></code> and <code><legend></code></li>
<li>I know what will happen when I press Submit — destructive or irreversible actions are confirmed</li>
</ul>
<h2>I know when something changes</h2>
<ul>
<li>Focus moves appropriately after an action (e.g., modal close, form submit, delete)</li>
<li>Loading states are communicated (spinners, skeleton screens, progress indicators)</li>
<li>Status messages are announced to assistive technology without stealing focus — ARIA live regions</li>
<li>Toast notifications and inline validation results are perceivable by screen readers, not just visually</li>
<li>Disabled and selected states are communicated, not conveyed by styling alone</li>
</ul>
<h2>I can understand when something has gone wrong and what my options are to resolve it</h2>
<ul>
<li>Clear, easy-to-understand error messages that answer:
<ul>
<li>What is the problem</li>
<li>What are my options to fix it</li>
</ul>
</li>
<li>Errors are associated with the relevant input field, not just displayed in a banner at the top of the page</li>
<li>Focus moves to the error so I know something happened (especially important for screen reader users)</li>
<li>Suggestions for correction are provided when possible</li>
<li>I don't lose my work when an error occurs — form data is preserved after a validation failure</li>
</ul>
</main>
</body>
</html>