Skip to content

[test][toggle button] Add axe tests and WCAG conformance reports - #48921

Open
michelengelen wants to merge 2 commits into
mui:masterfrom
michelengelen:a11y/stack/toggle-button
Open

[test][toggle button] Add axe tests and WCAG conformance reports#48921
michelengelen wants to merge 2 commits into
mui:masterfrom
michelengelen:a11y/stack/toggle-button

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 ToggleButton and ToggleButtonGroup.

ToggleButton

Result Count
✅ Supports 20
⚠️ Partially Supports 4
❌ Does Not Support 0
➖ Not Applicable 31

ToggleButtonGroup

Result Count
✅ Supports 4
⚠️ Partially Supports 0
❌ Does Not Support 0
➖ Not Applicable 31
↗ Inherited from ToggleButton 20

Known gaps: selected state conveyed almost entirely by hue (1.4.1), selected labels below 4.5:1 (1.4.3), and the ripple being the only focus indicator with no box-shadow fallback (1.4.11, 2.4.7).

Reports: ToggleButton/accessibility.md · ToggleButtonGroup/accessibility.md

Important

How to review this PR

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

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

Original work by @mj12albert. Supersedes #48733, 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 force-pushed the a11y/stack/toggle-button branch from 06a3273 to 73b255e Compare August 5, 2026 09:56
@michelengelen michelengelen added test accessibility a11y scope: toggle button Changes related to the toggle button. scope: toggle group Changes related to the toggle group. labels Aug 5, 2026
@michelengelen
michelengelen force-pushed the a11y/stack/toggle-button branch 5 times, most recently from c386dda to b0ff077 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/toggle-button branch 3 times, most recently from a931f45 to 5ef975a Compare August 11, 2026 12:25
@michelengelen

Copy link
Copy Markdown
Member Author

PR review

No findings.

The StandaloneToggleButton demo gains a real accessible name (aria-label="mark as done"), which fixes a genuine button-name violation in public docs. The 2.4.7 unit test is correctly browser-gated with it.skipIf(isJsdom()), and it is the reason ToggleButton needs no flag drop when #48945 automates 2.4.7 for the other components — the report is already unflagged with its own citation. Screenshot opt-outs for the ToggleButtonA11y* fixtures follow the same ordered disable/enable pattern as buttons.

Verdict

Approve - consistent with the stack template, plus a real docs accessibility fix.


🤖 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
@michelengelen
michelengelen force-pushed the a11y/stack/toggle-button branch from 5ef975a to c25598b Compare August 26, 2026 10:37
@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: toggle button Changes related to the toggle button. scope: toggle group Changes related to the toggle group. test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants