Description
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.