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

bug(RadioButton): Enter a required radio group, SR announces "required invalid data" #30761

Open
1 task
clamli opened this issue Apr 1, 2025 · 2 comments
Open
1 task
Labels
needs triage This issue needs to be triaged by the team

Comments

@clamli
Copy link
Contributor

clamli commented Apr 1, 2025

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

Screen reader announces "required invalid data..." when user enters an empty radio group that is required.

Reproduction

StackBlitz link: https://stackblitz.com/edit/uex8xzys?file=src%2Fexample%2Fradio-ng-model-example.html
Steps to reproduce:

  1. Go to https://stackblitz.com/edit/uex8xzys?file=src%2Fexample%2Fradio-ng-model-example.html
  2. Turn on screen reader
  3. Enter the radio group
  4. Hear the screen reader announces "required invalid data...."

Expected Behavior

Screen reader should not announce "invalid".

Actual Behavior

Screen reader announces "invalid".

Environment

  • Angular: Latest
  • CDK/Material: Latest
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): macOS
@clamli clamli added the needs triage This issue needs to be triaged by the team label Apr 1, 2025
@crisbeto
Copy link
Member

crisbeto commented Apr 2, 2025

I suspect that this is happening, because there's no value and the inputs are marked as required. Technically I think this is correct since the group is in an invalid state.

@clamli
Copy link
Contributor Author

clamli commented Apr 2, 2025

Ideally we want SRs to announce "required" which should be sufficient when a required radio group does not have a selection, and I sense this is something we attempted to fix in the past within MatInput which radio button is built on and I do not see attr.aria-invalid on the input inside radio button.

This may relate to the other radio button issue that required is used on individual radio button instead of the entire group.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage This issue needs to be triaged by the team
Projects
None yet
Development

No branches or pull requests

2 participants