-
Notifications
You must be signed in to change notification settings - Fork 8.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
[Enterprise Search] Improve flash messages screen reader UX #103412
Conversation
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.
I followed your repro and it works as you describe. I trust you to work out with @myasonik if this is the right way to go, but I don't want you blocked by ent-search-frontend approval
@elasticmachine merge upstream |
Thanks Byron! I'll hang tight on merging until I get confirmation from Michail on Monday 👍 |
- just `aria-live` is enough for screen readers to read it out, and `role` was causing "Flash messages" to get read out loud repeatedly between page navigation even when empty which was annoying and not good
Just chatted with Michail on Slack and he additionally recommended |
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
…103412) * Remove role region on flash messages - just `aria-live` is enough for screen readers to read it out, and `role` was causing "Flash messages" to get read out loud repeatedly between page navigation even when empty which was annoying and not good * Further a11y attribute recommendations from @myasonik
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
…#103596) * Remove role region on flash messages - just `aria-live` is enough for screen readers to read it out, and `role` was causing "Flash messages" to get read out loud repeatedly between page navigation even when empty which was annoying and not good * Further a11y attribute recommendations from @myasonik Co-authored-by: Constance <constancecchen@users.noreply.github.com>
Summary
I hadn't realized this earlier (totally my bad), but apparently
role="region"
was causing "Flash messages" to get read out loud (and in duplicate, which is fun) between every page navigation... even when it was empty and had no messages. 🤦♀️I tested in MacOS VO in Firefox with just
aria-live
and that seems to be enough for screen readers to pick up the messages without also needingrole
, and stops "Flash message" from getting read out on every page. That being said, I could be wrong on that or missing other screen readers - @myasonik, do you mind jumping in on if this is okay to do? I didn't see any axe-devtools warnings from this change FWIW.Checklist