Skip to content

[test][switch] Add axe tests and WCAG conformance report - #48919

Open
michelengelen wants to merge 2 commits into
mui:masterfrom
michelengelen:a11y/stack/switch
Open

[test][switch] Add axe tests and WCAG conformance report#48919
michelengelen wants to merge 2 commits into
mui:masterfrom
michelengelen:a11y/stack/switch

Conversation

@michelengelen

@michelengelen michelengelen commented Aug 4, 2026

Copy link
Copy Markdown
Member

Adds axe coverage and the WCAG 2.2 Level A/AA conformance report for Switch.

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

Known gaps: light-mode thumb and track stay under 3:1 (1.4.11), and disableRipple removes the focus indicator (2.4.7).

Report: Switch/accessibility.md

Important

How to review this PR

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

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

Original work by @mj12albert. Supersedes #48750, 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: switch Changes related to the switch. labels Aug 5, 2026
@michelengelen
michelengelen force-pushed the a11y/stack/switch branch 5 times, most recently from f7e16fc to 398f9e6 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/switch branch 3 times, most recently from 8096ec5 to 4aad137 Compare August 11, 2026 12:25
@michelengelen

Copy link
Copy Markdown
Member Author

PR review

No findings.

The four deleted tests were verified against the new WCAG block: the default-state, checked, and disabled assertions reappear under 4.1.2, and the old fireEvent-based toggle test is replaced by stronger user-event coverage (Space toggles both directions in 2.1.1, click in 3.2.2). No invariant was dropped, and the imports were pruned to match. The demoMeta comment explaining the FormControlLabelPosition exclusion (aria-prohibited-attr on a role-less FormGroup div) is accurate for the switches page.

Verdict

Approve - test relocation preserves all prior coverage and upgrades the interaction fidelity.


🤖 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
@github-actions github-actions Bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Aug 26, 2026
Applies mui#48916 (comment):
the shared reports table starts empty, and each component PR appends
its own row.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013HgD6GEW3UxNRvC2abbTy9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accessibility a11y scope: switch Changes related to the switch. test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants