-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
240 lines (240 loc) · 9.22 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta content="IE=edge, chrome=1" http-equiv="X-UA-Compatible" />
<meta content="width=device-width, initial-scale=1" name="viewport" />
<title>Accessibility</title>
<link href="dist/index.css" rel="stylesheet" />
</head>
<body class="start">
<header role="banner">
<h1>Accessibility Demos</h1>
</header>
<main role="main">
<section>
<h2>Tables</h2>
<ul>
<li>
<a href="demos/table/table-inaccessible.html">Inaccessible table</a>
<ul>
<li>Cells not connected to their headers.</li>
<li>Caption not connected to table.</li>
</ul>
</li>
<li>
<a href="demos/table/table-accessible.html">Accessible table</a>
<ul>
<li>
<code>th</code> with <code>scope</code> attribute used (<a
href="https://www.w3.org/WAI/WCAG21/Techniques/html/H63"
>H63</a
>).
</li>
<li><code>caption</code> used (<a href="https://www.w3.org/WAI/WCAG21/Techniques/html/H39">H39</a>).</li>
</ul>
</li>
</ul>
</section>
<section>
<h2>Text alternatives</h2>
<ul>
<li>
<a href="demos/images/images-inaccessible.html">Inaccessible images and icons</a>
<ul>
<li>No text alternative</li>
<li>Icon glyph is exposed to screen reader</li>
</ul>
</li>
<li>
<a href="demos/images/images-accessible.html">Inaccessible images and icons</a>
<ul>
<li>Visually hidden text alternative</li>
<li>
Icon element hidden reliably from screenreaders using a custom element with
<em>aria-hidden="true" role="presentation"</em>
</li>
</ul>
</li>
</ul>
</section>
<section>
<h2>Form markup and validation</h2>
<ul>
<li>
<a href="demos/form/form-inaccessible.html">Inaccessible form</a>
<ul>
<li><code>label</code> tags omitted or hidden.</li>
<li>Required fields not properly marked.</li>
<li>Inaccessible datepicker widget from UI framework.</li>
<li>Inaccessible styled select and checkbox.</li>
<li>Unnoticed insertion of error message.</li>
<li>No connection of error messages to invalid fields.</li>
</ul>
</li>
<li>
<a href="demos/form/form-accessible.html">Accessible form</a>
<ul>
<li>
<code>label</code> tags used (<a href="https://www.w3.org/WAI/WCAG21/Techniques/html/H44">H44</a>).
</li>
<li>
Required fields indicated with text (<a href="https://www.w3.org/WAI/WCAG21/Techniques/html/H90">H90</a
>).
</li>
<li>Using native elements for select and datepicker.</li>
<li>Tooltip inserted into <code>label</code> tags.</li>
<li>
Error messages inserted into <code>label</code> tags (<a
href="https://www.w3.org/WAI/WCAG21/Techniques/general/G83"
>G83</a
>).
</li>
<li>
First invalid field focused (<a href="https://www.w3.org/WAI/WCAG21/Techniques/client-side-script/SCR18"
>SCR18</a
>).
</li>
</ul>
</li>
<li>
<a href="demos/form/form-aria.html">Form validation using ARIA</a>
<ul>
<li>
<code>aria-required</code> used to mark required field (<a
href="https://www.w3.org/WAI/WCAG21/Techniques/aria/ARIA2"
>ARIA2</a
>).
</li>
<li><code>aria-invalid</code> used to dynamically mark invalid field.</li>
<li><code>aria-describedby</code> used to connect tooltips and error messages to field.</li>
</ul>
</li>
<li>
<a href="demos/form/form-html5.html">HTML5 form validation</a>
<ul>
<li><code>required</code> attribute used to mark required fields.</li>
</ul>
</li>
</ul>
</section>
<section>
<h2>Content structure</h2>
<ul>
<li>
<a href="demos/structure/structure-inaccessible.html">Inaccessible content structure</a>
<ul>
<li>No useful heading structure.</li>
<li>No skip navigation.</li>
</ul>
</li>
<li>
<a href="demos/structure/structure-accessible.html">Accessible content structure</a>
<ul>
<li>Visually hidden heading in each areas indicates its content.</li>
<li>Content areas use the semantically appropriate tags.</li>
<li>Visually hidden but focusable skip navigation allows to jump to specific areas.</li>
</ul>
</li>
</ul>
</section>
<section>
<h2>ARIA</h2>
<ul>
<li>
<a href="demos/aria/autosuggest-inaccessible.html">Inaccessible auto-suggest</a>
<ul>
<li>Suggestions not keyboard or screenreader accessible.</li>
<li>Screenreader users receivce no information about the suggestions.</li>
</ul>
</li>
<li>
<a href="demos/aria/autosuggest-accessible.html">Accessible auto-suggest</a>
<ul>
<li>Suggestions are keyboard-accessible.</li>
<li>ARIA live region tells the user about the suggestions.</li>
<li>ARIA roles <code>listbox</code> (container) and <code>option</code> (suggestions) added.</li>
<li>ARIA state <code>aria-expanded</code> toggled when suggestions are shown/hidden.</li>
</ul>
</li>
<li>
<a href="demos/aria/modal-inaccessible.html">Inaccessible modal</a>
<ul>
<li>The user is not informed about the opened modal.</li>
<li>Interaction with elements outside of it is still possible.</li>
</ul>
</li>
<li>
<a href="demos/aria/modal-accessible.html">Accessible modal</a>
<ul>
<li>
Focus is trapped within modal (via some
<a href="https://github.com/edenspiekermann/a11y-dialog/blob/master/a11y-dialog.js#L404-L424"
>JavaScript</a
>
intercepting tabbing), main page content is hidden. The user can only interact with the modal.
</li>
<li>ARIA role <code>dialog</code> is used to inform the user about the nature of this component.</li>
</ul>
</li>
<li>
<a href="demos/aria/modal-accessible-native.html">Accessible modal (native dialog)</a>
<ul>
<li>
Using the native <code>dialog</code> element in combination with <code>dialog.showModal()</code> takes
care of everything (assuming a recent browser).
</li>
</ul>
</li>
<!-- <li>
<a href="demos/aria/tabs-inaccessible.html">Inaccessible tabs (WIP)</a>
<ul>
</ul>
</li>
<li>
<a href="demos/aria/tabs-accessible.html">Accessible tabs (WIP)</a>
<ul>
</ul>
</li> -->
<li>
<a href="demos/aria/button-inaccessible.html">Inaccessible DIY button</a>
<ul>
<li>Not focusable</li>
<li>Not triggerable using the keyboard</li>
</ul>
</li>
<li>
<a href="demos/aria/button-accessible.html">Accessible DIY button</a>
<ul>
<li>Fake button supplied with <code>role="button"</code> and <code>tabindex="0"</code> attributes.</li>
<li>
<code>keydown</code> listener for enter and space keys added (<a
href="http://www.w3.org/WAI/GL/wiki/Making_actions_keyboard_accessible_by_using_keyboard_event_handlers_with_WAI-ARIA_controls#Example_1:_Using_Space_to_activate_a_button"
>w3c example</a
>).
</li>
</ul>
</li>
</ul>
</section>
<section>
<h2>Visual aspects</h2>
<ul>
<li>
<a href="demos/visual/focus-styles-inaccessible.html">Inaccessible focus styles</a>
<ul>
<li>"outline:none" used to remove focus outline. No visual indication on focus.</li>
</ul>
</li>
<li>
<a href="demos/visual/focus-styles-accessible.html">Accessible focus styles</a>
<ul>
<li>Using <code>:focus-visible</code> pseudo-class to decide whether to remove outline.</li>
</ul>
</li>
</ul>
</section>
</main>
<script src="dist/index.js"></script>
</body>
</html>