Skip to content

Comments

Fix/radio aria hidden decorative elements#32811

Open
shivdev277 wants to merge 10 commits intoangular:mainfrom
shivdev277:fix/radio-aria-hidden-decorative-elements
Open

Fix/radio aria hidden decorative elements#32811
shivdev277 wants to merge 10 commits intoangular:mainfrom
shivdev277:fix/radio-aria-hidden-decorative-elements

Conversation

@shivdev277
Copy link

Description

mat-radio-button includes several purely decorative/interactive child elements:

  • .mat-mdc-radio-touch-target — enlarged tap target
  • .mdc-radio__background — visual outer/inner circle
  • .mat-radio-ripple (MatRipple container) — ripple animation

These <div> elements were not hidden from the accessibility tree. VoiceOver (macOS)
traverses them and announces each one as an empty "group", causing multiple
unnecessary navigation stops per radio button. Users navigating via screen reader
expect exactly one stop per option (label + checked/unchecked state).

Fix

Added aria-hidden="true" to all three decorative elements in radio.html.
This matches the existing pattern already applied in checkbox.html (the SVG checkmark
carries aria-hidden="true" for the same reason).

Testing

  • Added a unit test in radio.spec.ts asserting that .mat-mdc-radio-touch-target,
    .mdc-radio__background, and .mat-radio-ripple all have aria-hidden="true".
  • Manually verified with VoiceOver on macOS: each radio button is now a single
    navigation stop announcing label and state only.

Files Changed

File Change
src/material/radio/radio.html Added aria-hidden="true" to 3 decorative elements
src/material/radio/radio.spec.ts Added accessibility unit test

Fixes #<ISSUE_NUMBER>

- Add new section explaining the usePopover option
- Include code examples for basic and advanced usage
- List benefits of using the native Popover API
- Add browser compatibility note

Closes #<issue-number>
- Add new section explaining the usePopover configuration option
- Include code examples for basic and advanced usage patterns
- List benefits of using the native Popover API
- Add browser compatibility notes for older browsers
…n reader accessibility

Decorative elements such as .mat-mdc-radio-touch-target, .mdc-radio__background
and the MatRipple container (.mat-radio-ripple) were being picked up by VoiceOver
and read aloud as empty 'group' elements. This caused multiple unnecessary navigation
stops per radio button when using a screen reader.

Adding aria-hidden='true' to these purely visual/interactive elements ensures that
screen readers only announce the native radio input with its label and checked state,
resulting in exactly one navigation stop per radio button.

A unit test has been added to verify that all three decorative elements carry
aria-hidden='true'.
@angular-robot angular-robot bot added area: docs Related to the documentation area: build & ci Related the build and CI infrastructure of the project area: cdk/overlay area: material/radio labels Feb 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: build & ci Related the build and CI infrastructure of the project area: cdk/overlay area: docs Related to the documentation area: material/radio

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant