-
-
Notifications
You must be signed in to change notification settings - Fork 291
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
BUG: Invalid WAI-ARIA setup preventing screen readers from announcing new toasts #306
Comments
Let's use the second solution. Whhat errors did you run into locally? You should be good with |
At first I got some errors after running
|
Same thing happened to me. Im running Edit: @FearlessSlug just install pnpm and your are good to go. I had not seen the |
@mmalomo Is correct, please use |
Looking at this as well. |
That would be great, I've been too busy to dive deeper into this. |
Alright, cool! Then I'll take it and update here early next week. |
Thank you @tricinel |
This is the idea (sound on): Screen.Recording.2024-03-20.at.09.24.41.movThe thing is, now we can't do the different What do you think? I could open a draft PR we can check. There are quite a few bells and whistles in there (like pointer event, swipping) which I must admit I haven't checked. And I don't have Windows 10 to check the original error. Maybe @FearlessSlug can check? |
Is there any update on this? I have been experiencing this in Cypress with it reporting as a "serious violation" which is not ideal. Thanks! 🙏🏻 |
I think I forgot about this. I'll open the PR. |
Hey @tricinel is there any update on when your Fix would be merged? I have been experiencing this in storybook with it reporting "violation". |
@ooluyole-balogun I couldn't say. I don't have merging permissions etc :) I started using my fork for my projects already, but happy to go back to the original and not miss on the great work already put into this. |
Describe the feature / bug 📝:
New toasts are not announced when using some screen readers like window's narrator (
ctrl+Start+Enter
on Windows 10/11) as well as old versions of iOS's VoiceOverSteps to reproduce the bug 🔁:
ctrl+Start+Enter
Why this is happening:
The problem occurs due to the ARIA setup of the toasts and how some screen readers handle ARIA live regions:
li
element withrole="status"
li
element is only present in the HTML when there's a toast and is removed when there's no toastSolution:
role="status"
that is always present in the HTML and the content of the latest toast will be injected to that elementrole="status"
to thesection
(which is always present in the HTML) and explicitly addaria-relevant="additions text"
to only announce additions and not removals and also explicitly addaria-atomic="false"
to not re-read all the toasts when a new toast is added but rather only the changessection
element as well as to theol
andli
elements in order to customize the looks / functionality and most importantly the ARIA settings (like changing thearia-label
to the website's language, because right now it's hard coded tonotifications alt+t
which in case you use a language that is not English it will make your site violate WGAC a11y rules which are required by law in some regions, states and countries)[I was trying to run this repo locally to test that my suggested changes work and create a pull request but I ran into too many errors and problems]
The text was updated successfully, but these errors were encountered: