-
Notifications
You must be signed in to change notification settings - Fork 841
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
[Accessibility] NVDA does announce toasts, => toast global list is not an aria live region #1947
Comments
Careful with this one. I remember trying to get aria-live to work like this and found that while it was semantically correct, the screenreader didn't announce the way I wanted it to. In general I've found aria live the most problematic of the standards and have to bypass it as often as I use it because browsers don't read updates correctly. At least in the docs currently, toasts announce as you would expect. Looking at the code, we have aria-live on the toasts themselves and not the list. If I remember correctly it was because the list itself wouldn't update, so it required individual items to work correctly. Often I've used role="alert" in similar situations. |
Thanks for pointing that out! Anyway, the current implementation doesn't work in NVDA while the provided screenshot shows me the VoiceOver announcement. |
@snide I will keep you posted, let's have a look at the final implementation once it's ready. |
Hello
Now the global toast list is just a div, while it should be an aria-live region.
Since it is, the screen reader will detect live region one the component is loaded, and then detect any changes inside the live region.
MDN provides explanation:
It's true, the current implementation doesn't work with NVDA, for instance.
Also:
They suggest that it should be implemented like Always make sure that the live region is present in the document first, and only then dynamically add/change any content.
I'm making a PR that aims to add that attribute to the component.
I've tested that with NVDA, please subscribe and have a look by the link I'm providing a little bit later.
Relative issues and PR:
aria-live="assertive"
to EuiToasts Addaria-live="assertive"
to EuiToasts #583cc @cchaos @snide
The text was updated successfully, but these errors were encountered: