-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
[test] Add demo-based axe-core accessibility tests for mui-material #48341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
siriwatknp
wants to merge
41
commits into
mui:master
Choose a base branch
from
siriwatknp:test/a11y-demos
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+664
−94
Open
Changes from 39 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
198e2d2
[test] Add demo-based axe-core accessibility tests for mui-material
siriwatknp d87e773
[test] Move enrollment to config.ts with status field; drop docs widget
siriwatknp 449aaeb
[test] Split a11y results into one JSON per component
siriwatknp 5de4203
[test] Enable every testable component with VRT auto-discovery
siriwatknp cd91b9c
[test] Rename skipRules to skipAssertions; drop Box from roster
siriwatknp b2fb66f
[test] Drop layout/behavior components from the roster
siriwatknp f9b4201
[test] Drop status field; pending entries become TODO comments
siriwatknp 238de9f
[test] Fold axe into VRT screenshot loop
siriwatknp 8c19506
fix ci
siriwatknp 33ea314
[test] Rename config.ts to a11yConfig.ts
siriwatknp 7d70287
[test] Move a11y infra to test/regressions/a11y/
siriwatknp 6751af1
[test] Drop docs:a11y wrapper; fold prettier into test:regressions
siriwatknp ccc7df4
fix ci
siriwatknp f337bc7
[test] Separate screenshot vs a11y exclusions via demoMeta
siriwatknp 909aea1
[test] Move a11y results to docs/data/material/a11y
siriwatknp e7c965a
[test] Regenerate a11y results for expanded demo coverage
siriwatknp b189f54
[test] Demo showing a11y results consumption
siriwatknp bc398a2
[test] Refactor demoMeta to rule arrays; per-demo a11y output
siriwatknp 5361e9a
[test] Regenerate a11y results as per-demo files
siriwatknp d68a6c1
[test] Scope A11Y_RULES to buttons only
siriwatknp 34db217
[test] Trim a11y results to buttons-only scope
siriwatknp 2620d1e
[docs] Document filtered a11y test runs in AGENTS.md
siriwatknp 884d665
[test] Rename ROUTE_RE to ROUTE_REGEX
siriwatknp cb5f024
Merge remote-tracking branch 'upstream/master' into docs/a11y-demo-st…
siriwatknp d41ef72
[test] Co-locate a11y output at components/{slug}/{slug}.a11y.json
siriwatknp de231e9
[test] Point test:regressions prettier at *.a11y.json
siriwatknp 8f61765
Merge branch 'master' into test/a11y-demos
siriwatknp 9492162
fix ci
siriwatknp d7e0b5e
[test] Drop field-merge in demoMeta; overrides restate every field
siriwatknp fcea236
Merge branch 'master' of github.com:mui/material-ui into test/a11y-demos
siriwatknp f3feac8
pnpm dedupe
siriwatknp 0ea22f4
revert lock file
siriwatknp 05c6b9d
update lock file
siriwatknp f470514
Merge branch 'master' of github.com:mui/material-ui into test/a11y-demos
siriwatknp 15af48c
install
siriwatknp fb166a0
apply suggestion
siriwatknp 6aa2965
Merge branch 'master' of github.com:mui/material-ui into test/a11y-demos
siriwatknp 8af9234
Merge remote-tracking branch 'upstream/master' into test/a11y-demos
siriwatknp f0a992c
fix ci
siriwatknp 64f462e
Merge branch 'master' of github.com:mui/material-ui into test/a11y-demos
siriwatknp fb71594
[test] Wire waitForSelector; prune stale a11y JSON
siriwatknp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| { | ||
| "BasicButtons": { | ||
| "passedRules": [ | ||
| "aria-allowed-attr", | ||
| "aria-conditional-attr", | ||
| "aria-prohibited-attr", | ||
| "aria-valid-attr", | ||
| "aria-valid-attr-value", | ||
| "button-name", | ||
| "color-contrast", | ||
| "nested-interactive", | ||
| "target-size" | ||
| ], | ||
| "failedRules": [], | ||
| "testedRules": { | ||
| "wcag2a": [ | ||
| "aria-allowed-attr", | ||
| "aria-conditional-attr", | ||
| "aria-prohibited-attr", | ||
| "aria-valid-attr-value", | ||
| "aria-valid-attr", | ||
| "button-name", | ||
| "nested-interactive" | ||
| ], | ||
| "wcag2aa": ["color-contrast"], | ||
| "wcag22aa": ["target-size"] | ||
| } | ||
| }, | ||
| "ColorButtons": { | ||
| "passedRules": [ | ||
| "aria-allowed-attr", | ||
| "aria-conditional-attr", | ||
| "aria-prohibited-attr", | ||
| "aria-valid-attr", | ||
| "aria-valid-attr-value", | ||
| "button-name", | ||
| "color-contrast", | ||
| "nested-interactive", | ||
| "target-size" | ||
| ], | ||
| "failedRules": [], | ||
| "testedRules": { | ||
| "wcag2a": [ | ||
| "aria-allowed-attr", | ||
| "aria-conditional-attr", | ||
| "aria-prohibited-attr", | ||
| "aria-valid-attr-value", | ||
| "aria-valid-attr", | ||
| "button-name", | ||
| "nested-interactive" | ||
| ], | ||
| "wcag2aa": ["color-contrast"], | ||
| "wcag22aa": ["target-size"] | ||
| } | ||
| } | ||
| } | ||
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would recommend prototyping the docs before generating for all other components. That way we can benchmark this data format first.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The structure is brought from #47895 to be able to show like this https://deploy-preview-47895--material-ui.netlify.app/material-ui/react-card/#accessibility-compliance
The thought behind:
https://dequeuniversity.com/rules/axe/*There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will there be an overview? As in, as a customer I'd like to know:
I can't be required to open each and every demo and aggregate myself to answer that question, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely, there should be an overview but we are not in the stage to do it (at least in this PR).
The main issue (the obvious one) is the color contrast which the team agree on having the test setup first, see how many affected, update the colors and iterate until the tests passed.
At the end, when we are confident about the compliance. We will have that overview page.
This PR is like a first step toward the goal. Let me know if you think any task should be slot in this PR apart from the setup.