-
Notifications
You must be signed in to change notification settings - Fork 6.8k
fix(material/snack-bar): fix Firefox/JAWS not reading out snackbar me… #21552
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
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.
Should we add this to a unit test assertion as well?
@@ -10,6 +10,6 @@ | |||
</div> | |||
|
|||
<!-- Will receive the snack bar content from the non-live div, move will happen a short delay after opening --> | |||
<div [attr.aria-live]="_live"></div> | |||
<div [attr.aria-live]="_live" role="alert"></div> |
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.
Can you add a comment about why we need the role
?
cc @zelliott I'm concerned this might have unintended consequences. One issue I see is that The Firefox bug you point to also seems like the issue is somewhat inconsistent? It might be better to leave the snackbar as-is and leave this as a known Firefox + JAWS bug outside of our responsibility. |
cc @haywoodsloan as the resident snackbar expert I defer all snackbar questions to :) |
When I worked on #20487 I switched the snackbar from using I wouldn't recommend setting The only report I've seen of setting both |
We have precedent for only doing certain behaviors based on the platform (e.g. Firefox only) specifically for screen-reader issues like this. @annieyw we could explore using |
9f87bca
to
4cba918
Compare
Changed to only adding |
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.
LGTM
Looks like the API gold needs to be updated |
4cba918
to
eec9637
Compare
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
…ssage
Add
role="alert"
to snackbar container.Known issue: JAWS does not read out
aria-live
region unless it hasrole="alert"
https://bugzilla.mozilla.org/show_bug.cgi?id=1453673
Fixes #21137