Report ARIA switch controls as "switch" with a state of on or off#14282
Merged
Conversation
In speech, negative of On is Off. In Braille, On and Off are represented the same as checked and not checked respectively.
…ow is mapped to the new Switch NVDA role, and state of On.
See test results for failed build of commit 59d3b8afa8 |
Contributor
Maybe consider "active" and "inactive" in place of "on" and "off"? "switch active" would be less likely considered a command. |
…n browse mode, and reporting focus.
7ab191b to
c1361ba
Compare
See test results for failed build of commit 54de1673a0 |
See test results for failed build of commit 37ebddf1cd |
seanbudd
reviewed
Oct 25, 2022
seanbudd
left a comment
Member
There was a problem hiding this comment.
Looks good, only 3 minor linting issues
seanbudd
approved these changes
Oct 25, 2022
Co-authored-by: Sean Budd <sean@nvaccess.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to issue number:
Fixes #11310
Summary of the issue:
Currently elements on the web with an ARIA role of "switch" are presented in NVDA as checkboxes.
This is because:
There is a lot of pressure from web authors and standards groups for NVDA to specifically report switch controls as having a role of "switch" rather than checkbox, as it is believed this improves communication between blind and sited individuals, as visually the switch control looks like a switch, not a checkbox.
Description of user facing changes
Description of development approach
The w3c ARIA examples submodule has also been updated to the latest main commit as the existing commit we were on did not yet have the switch example.
Testing strategy:
Given a switch control such as at https://www.w3.org/WAI/ARIA/apg/example-index/switch/switch
Known issues with pull request:
For a long time I have been uncomfortable with the word "switch" as it is both a verb and a noun. Also "on" and "off" are not past tense like "checked" or "pressed". Which then means you end up with a phraise like "switch on" which could either be taken as a command (incorrectly) as in "to switch on" or as a statement (correct) "the switch is on". There is not this ambiguity with something like "checkbox checked" or "toggle button pressed".
However, it seems that not many others are bothered by this, so I'm happy to give this ago and see where it lands with our users.
Change log entries:
New features
Changes
Bug fixes
For Developers
Code Review Checklist: