Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding aria-selected to listbox option, NVDA does not read "selected" #4816

Closed
nvaccessAuto opened this issue Jan 16, 2015 · 3 comments
Closed

Comments

@nvaccessAuto
Copy link

Reported by emallory on 2015-01-16 21:54
I have a listbox with several options. It is navigating using UP and DOWN arrows and I control this using javascript. When SPACE is pressed on an option, I add aria-selected='true' to indicate that the option has been selected. NVDA just reads "Space" and gives no indication that aria-selected has been added to the option.

Here's a jsfiddle that shows the issue: http://jsfiddle.net/elmal/3xce30z5/embedded/result/

@nvaccessAuto
Copy link
Author

Comment 1 by nvdakor on 2015-01-16 22:01
Hi,
Confirmed sort of in Firefox: if I use Internet Explorer (version 11), "selected" is announced, whereas in Firefox, nothing (or space) is announced. This is with latest next build (build 11501) with Firefox 34.
Does this happen with 2014.4 as well?
Thanks.

@nvaccessAuto
Copy link
Author

Comment 2 by emallory on 2015-01-16 22:12
Yes, I see the same thing. IE11 reads "Space Selected". Firefox reads "Space" or nothing.

@nvaccessAuto
Copy link
Author

Comment 3 by jteh on 2015-01-18 23:23
This is actually Firefox behaviour. However, I believe it to be correct. From the ARIA spec regarding aria-selected:

If no DOM element in the widget is explicitly marked as selected, assistive technologies MAY convey implicit selection which follows the keyboard focus of the managed focus widget.

So, because the item is focused, it's already implicitly selected. Therefore, setting aria-selected="true" doesn't change anything and thus NVDA doesn't announce any change. If you want the item to be unselected when focused, you need to explicitly set aria-selected="false".

Please reopen if you can provide evidence as to why this is incorrect behaviour.
Changes:
Added labels: invalid
State: closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant