Repository navigation
[test][button group] Add axe tests and WCAG conformance report - #49551
Merged
michelengelen merged 14 commits intoNov 27, 2026
Merged
michelengelen merged 14 commits into
michelengelen merged 14 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deploy previewBundle size
PerformanceNo regressions in 32 benchmarks · precise to ±8.9% (±13.0% at worst) · ran 3m 34s · details Check out the code infra dashboard for more information about this PR. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…a11ybuttongroup-assess-wcag-22-conformance # Conflicts: # packages/mui-material/src/ButtonGroup/ButtonGroup.test.js
…formance Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
siriwatknp
reviewed
Nov 23, 2026
…formance Keep both sides in the files that the IconButton PR (mui#49549) also edits. Regenerate the scorecard files with pnpm a11y:scorecard. ButtonGroup now inherits the Button 2.2.2 rating from master. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…formance Master now has the Link PR (mui#49555). Keep both sides in the files that it also edits. Regenerate the scorecard files with pnpm a11y:scorecard. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
michelengelen
enabled auto-merge (squash)
November 27, 2026 09:45
…formance Master now has the FormLabel PR (mui#49552). Keep both sides in the files that it also edits. Regenerate the scorecard files with pnpm a11y:scorecard. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…formance Master now has the Fab PR (mui#49550). Keep both sides in the files that it also edits. Regenerate the scorecard files with pnpm a11y:scorecard. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
LukasTy
approved these changes
Nov 27, 2026
michelengelen
deleted the
feature/mat-2021-a11ybuttongroup-assess-wcag-22-conformance
branch
November 27, 2026 11:20
michelengelen
added a commit
to michelengelen/material-ui
that referenced
this pull request
Nov 27, 2026
michelengelen
added a commit
to michelengelen/material-ui
that referenced
this pull request
Nov 27, 2026
This was referenced Nov 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds axe coverage, WCAG unit tests, and a WCAG 2.2 Level A/AA conformance report for
ButtonGroup. This is Wave 1, item 3 of #49260. Part of #49407.ButtonGroup
ButtonGroup inherits the Button report and rates only what the group adds: the group role and name, the layout, and the dividers.
Known gaps:
orientation="vertical"fixes it.focusVisibletheme ring fixes it.disableRippleordisableFocusRippleon the group removes the indicator from every button.infoandwarning), 2.2.2 (theloadingspinner), 2.4.3 (a focused button that turnsloadingloses focus), and 4.1.3 (loading).Report:
ButtonGroup/accessibility.mdChanges
ButtonGroup.test.js"WCAG 2.2 conformance" block covers:theme.focusVisible, the focused button getsz-index: 1, so the ring paints above its neighbors. This test runs only in the browser test projects (Chromium, WebKit, and Firefox in CI).disabledpasses to each button. A button withdisabled={false}stays enabled.assertions: 'all'. All rules pass. TheButtonGroupA11ySemanticStatesfixture covers a link button,aria-pressedtoggles, a disabled group, a vertical group, and the split button attributes.ButtonGroupA11yWideGroupis not enrolled for axe: it has only plain buttons, and it exists for the 320 px screenshot.VariantButtonGroup, and in the 2.4.7 focus-visible suite. A new screenshot ofButtonGroupA11yWideGroupat 320 px records a five-button group that does not fit. The test viewer hides horizontal overflow, so the screenshot shows the group clipped at the right edge.rollup.mjs. A group did not inherit a criterion that is not applicable by default when the parent rates it. So ButtonGroup showed Button's 2.4.4 and 4.1.3 as not applicable, which hid theloadinggap. The fix changes only the ButtonGroup report: Accordion, RadioGroup, and ToggleButtonGroup stay the same. The validator invalidate.mjsnow accepts such a criterion in an inheriting component'snotApplicablewhen the parent rates it, so the component can still opt out. The validator reads the parent ratings from the resolved report, so the two cannot drift.aria-expanded={open}, so a screen reader announces "collapsed" while the menu is closed. Before, the attribute was missing in that state.Decisions for review
orientation="vertical"fixes it. The rating isloadingloses focus. A grouped button has the same behavior, so ButtonGroup inherits the rating.Merge order with the sibling Wave 1 PRs
knownGaps.json,demoMeta.ts, anddemoMeta.test.ts. Resolve them by keeping both sides.scorecard.json,src/accessibility.md, andmanual-testing.md. Two PRs can produce the same line for different reasons, for example "26 Supports, 6 Partially Supports". Git then merges that line without a conflict, and the result is wrong. After each rebase, runpnpm a11y:scorecard.Not done in this PR
Follow-ups (tracked in #49477)
scripts/a11yScorecardhas no unit tests. TheinheritsandnotApplicablerules need a test project.inheritsresolves only the criteria that the direct parent rates itself, not the criteria that the parent inherits.🤖 Generated with Claude Code