-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Keyboard Shortcuts modal: some shortcuts are announced incorrectly by screen readers #15655
Comments
Thanks for spotting this 😄 It seems like it should be possible to extend the work done on #9582 to cover these options. I was a little surprised it doesn't already work, so it could also be a regression. I'll try to take a look at it when I have a spare moment. E2E tests might also be good if it turns out it is a regression. |
Update 2: I just tested again the aria-labels part and they do use correct "human friendly" strings to expand the punctuation characters. See for example the screenshot below: However, while VoiceOver with Safari announces the aria-labels, both NVDA and JAWS on Windows don't. Instead, they read out the text content so the punctuation characters are ignored. I'd tend to think the JAWS and NVDA behavior is the correct one. These aria-labels are used on https://www.w3.org/TR/using-aria/#label-support 2.10 Practical Support: aria-label, aria-labelledby and aria-describedby
That is: aria-label is not supposed to work on non-interactive elements that don't use some ARIA role. It's a bit unfortunate screen readers apparently don't get the nested To fix this, instead of messing with ARIA roles (I can't think of a suitable role for this case), I'd suggest to remove the aria-labels and use visually hidden text instead. The
This should be tested with Windows screen readers. Suggested combos:
|
Noticed while testing #15631
In the Keyboard Shortcuts modal, some shortcuts have an
aria-label
attribute:(Note: this is what is being used for macOS)
Other shortcuts don't have an
aria-label
. Thesearia-label
attributes were originally introduced because (depending also on user settings) most screen readers don't announce some punctuation. If a keyboard shortcut uses a comma, or a backtick, etc., the shortcuts text won't be announced correctly by screen readers, defeating the purpose of providing users with a list of shortcuts.For example, testing with Firefox and NVDA:
The shortcuts highlighted in the screenshot above are announced, respectively, as:
Possible options:
aria-label
attribute for all the shortcuts by expanding the keys names in plain text e.g.Control plus shift plus comma
.The text was updated successfully, but these errors were encountered: