- the
alertdialog
examples below are not modal, nor do they leave the visual layout undisturbed, but this is not what is being tested, which is how NVDA and some other screen readers handle them - NVDA tests performed with Firefox 3.6
- JAWS tests performed with Internet Explorer 8
Update: A day or so after posting these test cases, NVDA fixed things so that it now properly reads the alertdialog
's aria-describedby
description. NVDA development snapshots 3462 or later work well with Test 2 and Test 3 below. Thanks @jcsteh!
Test 1
aria-labelledby
andaria-describedby
settabindex="-1"
set onalertdialog
container- no focus set
Test 1 Results
NVDA 2010.1
- using "say all", since focus doesn't move when activating the button, NVDA rereads the "Open alertdialog #1" and then reads the contents of the
alertdialog
JAWS 11.0.756
- even though focus is not set, JAWS announces the
alertdialog
and reads all of its contents, but then jumps to the top of the page, reads theh1
, and stops
JAWS 10.0.1178
- JAWS just jumps to the top of the page, reads the
h1
, and stops
Test 2
- same as Test 1 except focus set to the
alertdialog
container
Test 2 Results
NVDA 2010.1
- NVDA announces "dialog" and the
alertdialog
title, i.e., "Blah blah dialog" - NVDA does not read the
alertdialog
message text
JAWS 11.0.756
- JAWS announces the
alertdialog
, reads all of its contents, and stops
JAWS 10.0.1178
- JAWS reads all of the
alertdialog
's contents, but does not identify thealertdialog
itself
Test 3
- same as Test 1 except focus set to the "close" button inside the
alertdialog
container
Test 3 Results
NVDA 2010.1
- NVDA announces "dialog" and the
alertdialog
title, i.e., "Blah blah dialog", and then announces the "close" button - NVDA does not read the
alertdialog
message text
JAWS 11.0.756
- JAWS announces the
alertdialog
, reads all of its contents, and then announces the "close" button
JAWS 10.0.1178
- JAWS simply says "close" but does not identify it as a button, nor does JAWS seem to fully have followed focus to the "close" button as pressing Enter does not activate it
Test 4
- same as Test 3 except the message text within the
alertdialog
container has (the invalid)role="label"
set, as per suggestion from @jcsteh, in order to get NVDA to read it
Test 4 Results
NVDA 2010.1
- NVDA announces "dialog" and the
alertdialog
title, i.e., "Blah blah dialog", reads the message text and then announces the "close" button
JAWS 11.0.756
- Same as Test 3: JAWS announces the
alertdialog
, reads all of its contents, and then announces the "close" button
JAWS 10.0.1178
- Same as Test 3: JAWS simply says "close" but does not identify it as a button, nor does JAWS seem to fully have followed focus to the "close" button as pressing Enter does not activate it