Skip to content

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

Closed
livepoll/live-poll
#189
@chrisbubernak

Description

@chrisbubernak

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    AccessibilityThis issue is related to accessibility (a11y)GThis is is related to a Google internal issueP3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentfeatureThis issue represents a new feature or feature request rather than a bug or bug fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions