Skip to content
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

Notifications should be read by screen reader #255

Closed
PVince81 opened this issue Nov 19, 2020 · 4 comments · Fixed by #622
Closed

Notifications should be read by screen reader #255

PVince81 opened this issue Nov 19, 2020 · 4 comments · Fixed by #622
Assignees
Labels
enhancement New feature or request

Comments

@PVince81
Copy link
Contributor

I think toast notifications should be read by screen readers when they appears.
Maybe there's a way to integrate this into the component.

https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_alert_role

The "polite" attribute could be set depending whether it's an error or warnings.

In some cases like in Talk, not sure if messages like "connection to signaling server is taking longer" is worth reading out. Maybe need an extra flag to prevent reading those ?

@skjnldsv skjnldsv transferred this issue from nextcloud-libraries/nextcloud-vue Dec 15, 2020
@ChristophWurst ChristophWurst added the enhancement New feature or request label Dec 15, 2020
@nickvergessen
Copy link
Contributor

Ref nextcloud/spreed#7105

New chat messages should be announced via aria-live="polite", including author and message content, see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions

Reading:
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions

aria-live="assertive" should only be used for time-sensitive/critical notifications that absolutely require the user's immediate attention. Generally, a change to an assertive live region will interrupt any announcement a screen reader is currently making. As such, it can be extremely annoying and disruptive and should only be used sparingly.

My suggestion would be to either use aria-live="assertive" for all, or at least the elements with aria-live="polite"

As far as I can see toastify-js does not allow this. So either we need to deal with it upstream or have to look for another library

@nickvergessen
Copy link
Contributor

In some cases like in Talk, not sure if messages like "connection to signaling server is taking longer" is worth reading out. Maybe need an extra flag to prevent reading those ?

Sure it's important, as it means you can not chat nor join the call.

But yeah as per above, I would default to:

  • assertive for errors
  • polite for others

and expose it as a prop so apps can overwrite.

@nickvergessen
Copy link
Contributor

Lib currently used https://github.com/apvarun/toastify-js

@nickvergessen
Copy link
Contributor

Reported upstream at apvarun/toastify-js#105 with a link to our workaround

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants