Skip to content

[test][radio] Add axe tests and WCAG conformance reports - #48920

Open
michelengelen wants to merge 7 commits into
mui:masterfrom
michelengelen:a11y/stack/radio
Open

[test][radio] Add axe tests and WCAG conformance reports#48920
michelengelen wants to merge 7 commits into
mui:masterfrom
michelengelen:a11y/stack/radio

Conversation

@michelengelen

@michelengelen michelengelen commented Aug 4, 2026

Copy link
Copy Markdown
Member

Adds axe coverage and WCAG 2.2 Level A/AA conformance reports for Radio and RadioGroup.

Radio

Result Count
✅ Supports 23
⚠️ Partially Supports 2
❌ Does Not Support 0
➖ Not Applicable 30

RadioGroup

Result Count
✅ Supports 7
⚠️ Partially Supports 0
❌ Does Not Support 0
➖ Not Applicable 30
↗ Inherited from Radio 18

Known gaps: focus-indicator contrast and custom icons below 3:1 (1.4.11), and disableRipple removing the focus indicator (2.4.7). No group-level gaps.

Reports: Radio/accessibility.md · RadioGroup/accessibility.md

Important

How to review this PR

Layer 7 of 14 in a stacked series (#48915#48926). Its branch is built on a11y/stack/switch (#48919). GitHub cannot chain PR bases across a fork, so every PR in the series targets master instead.

Review only the last commitd2b70c8. Everything above it belongs to the layers below, and disappears as those merge.

Original work by @mj12albert. Supersedes #48751, rebased onto current master.

Part of the WCAG conformance effort (#14187).

@code-infra-dashboard

code-infra-dashboard Bot commented Aug 4, 2026

Copy link
Copy Markdown

Deploy preview

Bundle size

Bundle Parsed size Gzip size
@mui/material 0B(0.00%) 0B(0.00%)
@mui/lab 0B(0.00%) 0B(0.00%)
@mui/private-theming 0B(0.00%) 0B(0.00%)
@mui/system 0B(0.00%) 0B(0.00%)
@mui/utils 0B(0.00%) 0B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

@michelengelen michelengelen added test accessibility a11y scope: radio Changes related to the radio. scope: radio group Changes related to the radio group. labels Aug 5, 2026
@michelengelen
michelengelen force-pushed the a11y/stack/radio branch 5 times, most recently from 53cd134 to 8dde96f Compare August 6, 2026 10:43
@michelengelen
michelengelen marked this pull request as ready for review August 7, 2026 10:15
@michelengelen
michelengelen force-pushed the a11y/stack/radio branch 2 times, most recently from 11705fa to ed67a1e Compare August 7, 2026 13:00
Lets a fixture assert every axe rule it exercises rather than only the
CSS-dependent visual ones, which is what the per-component WCAG reports
need.
Adds a table-driven Playwright suite covering 1.4.10 Reflow, 1.4.4 Resize
Text and 1.4.12 Text Spacing across the assessed components. axe has no rule
for any of them, so they were rated Manual on evidence from source review.
@michelengelen

Copy link
Copy Markdown
Member Author

PR review

Nothing merge-blocking. The inputPropsslotProps.input demo modernization is a welcome side fix, and the browser-gated roving-focus test for RadioGroup is correctly skipIf(isJsdom()). The two RadioGroup tests that were deleted (radiogroup role, shared generated name) reappear unchanged under 1.3.1. One parity gap.

Tests (1)

1. 🟡 Radio 2.5.2 skips the cancellation branch the sibling suites assert

Location: packages/mui-material/src/Radio/Radio.test.js:257

it('2.5.2 Pointer Cancellation: activates on the pointer up-event, not the down-event', ...

Button, Checkbox, Switch, and ToggleButton all press on the control, move off the target, release, and assert that nothing activates. The Radio test only asserts that the down-event alone does not select. The abort path — the substance of 2.5.2 — is untested for Radio.

Failure scenario: a regression that commits the selection on pointerdown-plus-pointerup-anywhere passes this test.

Fix: add the press → move to an outside target → release sequence and assert checked stays false, as in the Checkbox suite.

Verdict

Approve after nits - one missing cancellation branch keeps Radio below the parity of its sibling suites.


🤖 Review generated with Claude Code

@github-actions github-actions Bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accessibility a11y PR: out-of-date The pull request has merge conflicts and can't be merged. scope: radio group Changes related to the radio group. scope: radio Changes related to the radio. test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants