-
Notifications
You must be signed in to change notification settings - Fork 3.8k
fix: Improve ARIA region handling (experimental) #9485
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
fix: Improve ARIA region handling (experimental) #9485
Conversation
|
@microbit-robert I probably won't put this into review until you have a chance to check it with micro:bit (unless you prefer we merge it, first). I'm hoping the experience is better now, but I am a bit limited in only being able to test with ChromeVox. |
|
@BenHenning It looks like VoiceOver swaps the word "group" in for "region". Both NVDA and JAWS just drop the word "region" so are less verbose. This seems to help ChromeVox a little bit. No reason not to merge I don't think. |
Well, sometimes. ChromeVox does use the word 'region' just not consistently (e.g. when switching between toolbox/flyout 'region' is usually appended at the very end of the readout, but 'region end' rarely reads out). |
|
PTAL @maribethb. |
BenHenning
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spot check review.
|
Thanks @maribethb! Going ahead and merging this since the CI failure is unrelated. |
bbe6cc9
into
RaspberryPiFoundation:add-screen-reader-support-experimental
The basics
The details
Resolves
Fixes #9451
Proposed Changes
Removes the ARIA
regionrole for both flyouts and workspaces that are within mutators.Reason for Changes
The use of the
regionrole only adds confusion and slightly messes up region announcements for screen readers.generichas been used instead since it's the default container role (e.g. fordiv) and seems sufficient for what needs to be described in this case.Note that the delayed initialization for the flyout role is due to flyout initialization happening a bit later than its workspace DOM creation (so it doesn't seem possible to check for mutator status yet). There might be ways of doing this a bit more cleanly as part of #9307.
Test Coverage
No automated tests are needed for this experimental change. Manual testing comprised of navigating between the main workspace, the main workspace's toolbox and flyout, and a mutator workspace and flyout to validate that no unusual region readouts were happening. The accessibility node tree was also analyzed to verify that
genericis correctly being applied as the role for the mutator workspace and flyout.Documentation
No new documentation is needed for this experimental change.
Additional Information
This doesn't fully resolve all region issues, but it resolves the main ones (especially when combined with #9483 for NVDA). The main remaining problem at this point is that the main workspace itself is usually not read out as a region and it's not clear why. I suspect it has something to do with focus manager and how it automatically moves focus, but I'm not entirely sure what specific mechanism is causing the problem since both toolbox and flyout do something similar and don't have the same issue (flyout is particularly noteworthy since it's a workspace in itself).
There may be some other focus oddities happening to cause the difference but, for now, this seems reasonable. If testing or user feedback find that the lack of consistent region readout is problematic for the main workspace then a new issue can be opened and investigated separately.