Skip to content

[test] Automate the CSS-dependent WCAG criteria - #48936

Open
michelengelen wants to merge 2 commits into
mui:masterfrom
michelengelen:a11y/stack/css-layout
Open

[test] Automate the CSS-dependent WCAG criteria#48936
michelengelen wants to merge 2 commits into
mui:masterfrom
michelengelen:a11y/stack/css-layout

Conversation

@michelengelen

@michelengelen michelengelen commented Aug 6, 2026

Copy link
Copy Markdown
Member

Adds a table-driven Playwright suite covering the CSS-dependent WCAG criteria that axe has no rule for, so they stop resting on source review alone:

  • 1.4.10 Reflow — no horizontal scrolling at a 320px viewport
  • 1.4.4 Resize Text — content survives a 200% text size
  • 1.4.12 Text Spacing — content survives the WCAG spacing overrides

11 components are enrolled through one representative demo each, giving 32 assertions. Entries skip routes the current bundle doesn't contain, so the suite is correct regardless of which components have been enrolled yet.

The clip check measures the text range against its box and ignores hidden subtrees, rather than comparing scrollWidth/clientWidth. That distinction matters: a Switch root clips its ripple and a collapsed Accordion panel is visibility: hidden — neither loses content, and a naive check flags both.

Avatar's 1.4.4 is deliberately excluded. The suite asserts text-only resize; Avatar's fixed 40px box only scales under full-page zoom. Its report already considered this and rates it against page zoom, calling text-only "an author concern", so the rating is left as-is rather than silently downgraded.

Together with the unit tests added in the component PRs, this takes the ⚙️ Automated column from 62/230 to 94/230, and verified evidence from 155/230 to 185/230.

Important

How to review this PR

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

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

Part of the WCAG conformance effort (#14187).

@code-infra-dashboard

code-infra-dashboard Bot commented Aug 6, 2026

Copy link
Copy Markdown

Deploy preview

https://deploy-preview-48936--material-ui.netlify.app/
QR code for https://deploy-preview-48936--material-ui.netlify.app/

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/css-layout branch 2 times, most recently from 1ea91f9 to a71dd4e Compare August 6, 2026 10:43
@michelengelen michelengelen self-assigned this Aug 7, 2026
@michelengelen
michelengelen marked this pull request as ready for review August 7, 2026 10:14
@michelengelen
michelengelen force-pushed the a11y/stack/css-layout branch from a71dd4e to 9ca0385 Compare August 7, 2026 11:37
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
michelengelen force-pushed the a11y/stack/css-layout branch from 9ca0385 to ce470aa Compare August 7, 2026 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants