diff --git a/aria-alert-validation.html b/aria-alert-validation.html new file mode 100644 index 0000000..1e6681e --- /dev/null +++ b/aria-alert-validation.html @@ -0,0 +1,73 @@ + + +
+ +Go to overview: WAI-ARIA techniques with code examples
+ + +role=dialog
(optimised for mobile browsers), now also tested with NVDA 2012.3.1Detlev Fischer, (detlev [dot] fischer [ at ] testkreis [dot] de)
+Twitter: @wcagtest
+Last update: 15 April 2013
+ +Note (9. April): Following feedback from @mixolydian who asked why testing had originally used a slightly dated version of NVDA, I have re-tested with a more recent version (2012.3.1), only to find that the script re-focussing the triggering button does not work anymore in NVDA.
+ +Note (10. April): A discussion with @jcsteh shows that the reason why focus management in NVDA currently does not work properly may be that the focus is re-set before the setting of aria-hidden
to false takes effect (even though the line occurs before the focus is re-set). Interestingly, this problem did not occur in NVDA 2012.2 because that version did not support aria-hidden
and thereby did not prevent the re-setting the focus into something NVDA thinks is still hidden. I have filed a bug @ NVDA.
This serves to show that any optimisation of code and ARIA markup to ensure something works across as many platforms, browsers and screen readers as possible deals with a moving target. The fine-tuned behavior may fail to work its magic in the next minor update of a browser or screenreader.
+ +Earlier note: Following feedback and active code input from @cookiecrook I have updated the original example of role=dialog to improve accessibility (see section on changes below).
+ + +The example shows how to use the Aria role dialog
when opening pseudo window (div boxes) dialogues via scripting. The div
with role=dialog
references the h3
heading inside the dialog box via the aria-labelledby
attribute, as recommended by @gezlemon in his article Custom-Built Dialogs. For simplicty, the dialogue div
is originally just hidden, not dynamically inserted on the page via DOM scripting (I hope this doesn't make a difference in terms of focus handling, but it may).
The example is based the focus management scripts from Making an accessible dialog box by Nicholas C. Zakas (note that this author recommends using aria-describedby
to reference the heading inside the dialogue).
aria-hidden
after moving the focus to the dialog div
. This ensures the dialog will be treated as a modal dialog by screen readers as opposed to a non-modal dialog.role="button"
to the triggering link to tackle a bug regarding moving focus from a link to a buttondialog
to announce a dialog (pop-up div box)The sequence runs from focusing the trigger link to refocusing the same link after closing the dialogue. Tabbing action is indicated with TAB, enter with ENTER (Mac OS X: RETURN), arrowing down with DOWN ARROW, swiping with RIGHT SWIPE, double tapping with DOUBLE TAP.
+ +Win 7, IE 9, JAWS 14 | +Supported | +
+
|
+
---|---|---|
Win 7, FF 20, JAWS 14 | +Supported | +
+
|
+
Win 7, IE9, NVDA 2012.3.1 | +Supported (but no re-focusing of trigger) | +
+
|
+
Win 7, IE9, NVDA 2012.2.1 | +Supported | +
+
|
+
Win 7, FF 20, NVDA 2012.3.1 | +Supported (but no re-focussing of trigger) | +
+
Note that with NVDA 2012.3.1, the focus management with |
+
Win 7, FF 18, NVDA 2012.2.1 | +Supported | +
+
|
+
Mac OS 10.8.x, Safari, VoiceOver | +Supported | +
+
|
+
Mac OS 10.8.x, Safari, VoiceOver (Test supplied by @cookiecrook) |
+ Supported | +
+
|
+
Mac OS 10.6.8, Safari, VoiceOver | +Partial support | +
+ While VO does not speak role dialog, it does announce the dialog heading associated via
|
+
iOS 6.1.3, Safari, VoiceOver (iPad mini) | +Partial support | +
+ While VO does not speak role dialog, it does announce the dialog heading associated via Swiping: Note that the focus trapping behaviour (i.e., VO focus can't be moved beyond the cancel button) depends on the entire rest of the page (i.e. everything but the dialog |
+
Android 4.2, Firefox, Talkback (Nexus 7) | +Partial support | +
+ Swiping: Note that the role dialog is announced only after closing the dialog, so this is not so useful. Setting the focus to the dialog |
+
This is a test in US English
+This is a test in Spanish
+ +Hello - this is an undefined paragraph in a french div
+This is in US English
+This is in UK English
+Delivery slots | +Monday | +Tuesday | +Wednesday | +Thursday | +Friday | +
---|---|---|---|---|---|
09:00 - 11:00 | +Closed | +Open | +Open | +Closed | +Closed | +
11:00 - 13:00 | +Open | +Open | +Closed | +Closed | +Closed | +
13:00 - 15:00 | +Open | +Open | +Open | +Closed | +Closed | +
15:00 - 17:00 | +Closed | +Closed | +Closed | +Open | +Open | +
Delivery slots | +Monday | +Tuesday | +Wednesday | +Thursday | +Friday | +
---|---|---|---|---|---|
09:00 - 11:00 | +Closed | +Open | +Open | +Closed | +Closed | +
11:00 - 13:00 | +Open | +Open | +Closed | +Closed | +Closed | +
13:00 - 15:00 | +Open | +Open | +Open | +Closed | +Closed | +
15:00 - 17:00 | +Closed | +Closed | +Closed | +Open | +Open | +
PayrollRef. | +Name | +Jul | +Aug | +Sept | +Oct | +Nov | +Dec | +
---|---|---|---|---|---|---|---|
215 | +Abel | +5 | +2 | +0 | +0 | +0 | +3 | +
231 | +Annette | +0 | +5 | +3 | +0 | +0 | +6 | +
173 | +Bernard | +2 | +0 | +0 | +5 | +0 | +0 | +
141 | +Gerald | +0 | +10 | +0 | +0 | +0 | +8 | +
99 | +Michael | +8 | +8 | +8 | +8 | ++ | 4 | +
PayrollRef. | +Name | +Jul | +Aug | +Sept | +Oct | +Nov | +Dec | +
---|---|---|---|---|---|---|---|
215 | +Abel | +5 | +2 | +0 | +0 | +0 | +3 | +
231 | +Annette | +0 | +5 | +3 | +0 | +0 | +6 | +
173 | +Bernard | +2 | +0 | +0 | +5 | +0 | +0 | +
141 | +Gerald | +0 | +10 | +0 | +0 | +0 | +8 | +
99 | +Michael | +8 | +8 | +8 | +8 | ++ | 4 | +
Poster name | +Color | +Sizes available | +||
---|---|---|---|---|
Zodiac | +Full color | +A2 | +A3 | +A4 | +
Black and white | +A1 | +A2 | +A3 | +|
Sepia | +A3 | +A4 | +A5 | +|
Angels | +Black and white | +A1 | +A3 | +A4 | +
Sepia | +A2 | +A3 | +A5 | +
Poster name | +Color | +Sizes available | +||
---|---|---|---|---|
Zodiac | +Full color | +A2 | +A3 | +A4 | +
Black and white | +A1 | +A2 | +A3 | +|
Sepia | +A3 | +A4 | +A5 | +|
Angels | +Black and white | +A1 | +A3 | +A4 | +
Sepia | +A2 | +A3 | +A5 | +