You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/checkbox/checkbox.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ <h1>Checkbox Example (Two State)</h1>
29
29
30
30
<p>Similar examples include: </p>
31
31
<ul>
32
-
<li><ahref="../checkbox-2/checkbox-2.html">Checkbox (Mixed-State)</a>: Mixed state checkbox controlling standard input checkboxes.</li>
32
+
<li><ahref="checkbox-mixed.html">Checkbox (Mixed-State)</a>: Demonstrates a checkbox that uses the mixed value for aria-checked to reflect and control checked states within a group of two-state HTML checkboxes contained in an HTML <code>fieldset</code>.</li>
Copy file name to clipboardExpand all lines: examples/dialog-modal/alertdialog.html
+37-21Lines changed: 37 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -35,15 +35,14 @@ <h1>Alert Dialog Example</h1>
35
35
<p>To use this example:</p>
36
36
<ul>
37
37
<li>
38
-
Activate the "discard" button to trigger a confirmation dialog.
38
+
Activate the "discard" button to trigger a confirmation dialog that has the <code>alertdialog</code> role.
39
39
<ul>
40
-
<li>Activating the "yes" button removes the contents of both the "Notes" text area and local storage of the notes.</li>
40
+
<li>Activating the "yes" button in the confirmation dialog removes the contents of both the "Notes" text area and local storage of the notes.</li>
41
41
<li>Activating the "no" button or pressing <kbd>escape</kbd> closes the dialog.</li>
42
42
<li>The "discard" button is disabled if the notes text area does not contain any text.</li>
43
43
</ul>
44
44
</li>
45
-
<li>
46
-
Activate the "save" button to trigger an alert when it saves the contents of the "Notes" text area to <ahref="https://www.w3.org/TR/webstorage/#the-localstorage-attribute">local storage</a>.
45
+
<li>Activate the "save" button to trigger an alert when the contents of the "Notes" text area is saved to <ahref="https://www.w3.org/TR/webstorage/#the-localstorage-attribute">local storage</a>.
47
46
<ul>
48
47
<li>A successful save triggers a short alert to notify the user that the notes have been saved.</li>
49
48
<li>The "save" button is disabled if the user's local storage value is the same as the "Notes" field.</li>
@@ -68,9 +67,17 @@ <h2 id="ex_label">Example</h2>
68
67
<divid="ex_alertdialog">
69
68
<labelfor="notes">Notes</label>
70
69
<textareaclass="notes" name="notes" id="notes" rows="7">This is an example text box, which unsurprisingly contains text. The user is given the option to save this text - which triggers a basic alert - or to discard the text - which triggers an alert dialog that prompts the user for confirmation.</textarea>
<li>The accessible label for the alert dialog is set to its heading ("Confirmation").</li>
98
+
<ul>
99
+
<li>The accessible name of the alert dialog is set to its heading ("Confirmation").</li>
93
100
<li>The dialog's prompt ("Are you sure...?") is referenced via <code>aria-describedby</code> to ensure that the user is immediately aware of the prompt.</li>
94
101
<li>
95
102
Focus is automatically set to the first focusable element inside the dialog, which is the "No" <code>button</code>.
96
103
This is the least destructive action, so focusing "No" helps prevent users from accidentally confirming the destructive "Discard" action, which cannot be undone.
97
104
</li>
98
-
</ol>
105
+
<li>
106
+
When the buttons are disabled, <code>aria-disabled</code> is used instead of the HTML <code>disabled</code> attribute so the buttons will remain in the page <kbd>Tab</kbd> sequence.
107
+
This makes it easier for screen reader users to discover the buttons and discern how the interface works.
Gives the alert dialog an accessible description by referring to the alert dialog content that describes the primary message or purpose of the alert dialog.
<td>Tells assistive technology users the button cannot be activated.</td>
211
+
</tr>
195
212
</tbody>
196
213
</table>
197
214
<h3>Notes on <code>aria-modal</code> and <code>aria-hidden</code></h3>
198
-
<ol>
215
+
<ul>
199
216
<li>
200
217
The <code>aria-modal</code> property was introduced in ARIA 1.1.
201
-
As a new property, screen reader users may experience varying degrees of support for it.
218
+
As a relatively new property, screen reader users may experience varying degrees of support for it.
202
219
</li>
203
220
<li>
204
-
Applying the <code>aria-modal</code> property to the <code>dialog</code> element
205
-
replaces the technique of using <code>aria-hidden</code> on the background for informing assistive technologies that content outside a dialog is inert.
221
+
Applying the <code>aria-modal</code> property to the <code>dialog</code> element replaces the technique of using <code>aria-hidden</code> on the background for informing assistive technologies that content outside a dialog is inert.
206
222
</li>
207
223
<li>
208
224
In legacy dialog implementations where <code>aria-hidden</code> is used to make content outside a dialog inert for assistive technology users, it is important that:
209
-
<ol>
225
+
<ul>
210
226
<li><code>aria-hidden</code> is set to <code>true</code> on each element containing a portion of the inert layer.</li>
211
227
<li>The dialog element is not a descendant of any element that has <code>aria-hidden</code> set to <code>true</code>.</li>
212
-
</ol>
228
+
</ul>
213
229
</li>
214
-
</ol>
230
+
</ul>
215
231
</section>
216
232
<section>
217
233
<h2id="src_label">Javascript and CSS Source Code</h2>
0 commit comments