Skip to content

fix(material/form-field): restore aria-live on mat-error#33569

Open
charles-stivali-87 wants to merge 2 commits into
angular:mainfrom
charles-stivali-87:fix/form-field-error-live-region
Open

fix(material/form-field): restore aria-live on mat-error#33569
charles-stivali-87 wants to merge 2 commits into
angular:mainfrom
charles-stivali-87:fix/form-field-error-live-region

Conversation

@charles-stivali-87

@charles-stivali-87 charles-stivali-87 commented Jul 22, 2026

Copy link
Copy Markdown

Summary

Moves the live region for form-field errors back to mat-error instead of the persistent subscript wrapper. This prevents screen readers from announcing the same error twice when the control is already associated to the error message through aria-describedby.

Why

The current wrapper-level aria-live causes NVDA to announce the error once because the error content changes inside the live region, and again because the form control references the same error via aria-describedby.

By moving the live region back to mat-error, the announcement remains polite while avoiding the duplicate announcement caused by the always-present wrapper.

What changed

  • restore aria-live="polite" on mat-error when no explicit value is provided
  • keep aria-atomic="true" on the error message
  • remove the wrapper-level live region from the subscript container
  • update the input accessibility spec to assert the new behavior

Validation

  • validated in a consumer app with NVDA
  • confirmed the error is announced once instead of twice

Fixes #32104

cc: @wagnermaciel

@google-cla

google-cla Bot commented Jul 22, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@charles-stivali-87
charles-stivali-87 force-pushed the fix/form-field-error-live-region branch from 7f8dc6c to 1fea95d Compare July 22, 2026 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(mat-error): mat-error presentation is announces twice with NVDA screen reader

1 participant