Skip to content

bug(MatError): Screen reader doesn't announce errors shown after tabbing out of the field #29616

Closed
@clamli

Description

@clamli

Is this a regression?

  • Yes, this behavior used to work in the previous version
    I lean towards uncheck this checkbox even though it works in the previous version, because I suspect the issue resides in either screen readers or browsers.

It looks like the cause of the issue is the MatError logic of handling live region, here is a raw HTML implementation that reflects the same behavior.

The previous version in which this bug was not present was

No response

Description

Some screen readers don't announce errors shown after tabbing out to the next interactive element.

The screen reader and browser combination that DOES announce the error after tabbing out

The screen reader and browser combination that DOES NOT announce the error after tabbing out

Reproduction

https://material.angular.io/components/form-field/overview#form-field-error
Steps to reproduce:

  1. Go to the example above
  2. Tab to and out of the form field with MatError using different screen reader and browser combinations and observe the announcement

Expected Behavior

The error message should always be announced by screen readers.

Actual Behavior

The error message is announced for NVDA + Chrome, JAWS + Chrome and JAWS + Firefox, but is not announced for NVDA + Firefox, VO + Chrome and VO + Firefox.

Environment

  • Angular:
  • CDK/Material: 18.2.0
  • Browser(s): Chrome, Firefox
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows, macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    AccessibilityThis issue is related to accessibility (a11y)P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/form-field

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions