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

feat(mat-error): Make mat-error politeness configurable and/or have a less disruptive default. #21781

Closed
chrisbubernak opened this issue Feb 3, 2021 · 2 comments · Fixed by #21870 or livepoll/live-poll#189
Labels
Accessibility This issue is related to accessibility (a11y) feature This issue represents a new feature or feature request rather than a bug or bug fix G This is is related to a Google internal issue P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@chrisbubernak
Copy link
Contributor

Feature Description

I would like for the <mat-error> component to not use role="alert" and instead use aria-live="polite" or at least make the politeness configurable via an Input binding as in many cases the assertive/interruptive announcement is harmful to the user.

Use Case

Assuming mat-errors can appear as a dynamic update (which they can, because form fields can validate on blur or while typing), that update needs to be expressed to the user in some form to comply with WCAG 4.1.2. AFAIK there is nothing that says that the user must be interrupted to do so. In most screen readers the usage of the role="alert", on inline dynamic errors that occur when focus leaves a field, can cause the error message to supersede announcing the new control that has focus. This can lead to additional errors where the user changes the value of the wrong field

Implementation Details

Happy to contribute myself.

@chrisbubernak chrisbubernak added feature This issue represents a new feature or feature request rather than a bug or bug fix needs triage This issue needs to be triaged by the team labels Feb 3, 2021
@jelbourn jelbourn added Accessibility This issue is related to accessibility (a11y) G This is is related to a Google internal issue P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent and removed needs triage This issue needs to be triaged by the team labels Feb 3, 2021
@jelbourn
Copy link
Member

jelbourn commented Feb 3, 2021

Just posting here that @chrisbubernak plans to send a PR for this one (so that nobody else does the same)

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Apr 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.