Automated WCAG 2.1 AA a11y testing across all themes/modes#38
Draft
sjoerdbeentjes wants to merge 11 commits into
Draft
Automated WCAG 2.1 AA a11y testing across all themes/modes#38sjoerdbeentjes wants to merge 11 commits into
sjoerdbeentjes wants to merge 11 commits into
Conversation
b563368 to
871c744
Compare
♿ Accessibility audit — WCAG 2.1 AA@surfnet/react — 41 finding(s)Button — 41 finding(s)As Link — 10 finding(s)
Default — 1 finding(s)
Sizes — 1 finding(s)
Variants — 20 finding(s)
With Icon — 9 finding(s)
Automated axe covers ~30–50% of WCAG 2.1 AA. Keyboard, screen-reader and reflow checks still need a manual pass. Full per-story JSON is in the run’s |
Collaborator
Author
|
Example report from earlier test run with forced violations: ♿ Accessibility audit — WCAG 2.1 AA@surfnet/react — 87 finding(s)Button — 87 finding(s)A11Y Violation Check — 3 finding(s)
As Link — 10 finding(s)
Default — 1 finding(s)
Link In Text Block Check — 22 finding(s)
Mixed Violations Check — 21 finding(s)
Sizes — 1 finding(s)
Variants — 20 finding(s)
With Icon — 9 finding(s)
Automated axe covers ~30–50% of WCAG 2.1 AA. Keyboard, screen-reader and reflow checks still need a manual pass. Full per-story JSON is in the run’s |
65e29e3 to
70b2499
Compare
70b2499 to
4e73d0f
Compare
Dot-prefix the per-package report output (and the generated PR-comment markdown) so a single .gitignore entry covers them and they read as generated/hidden. Updates the audit default dir, the comment script's read/write paths, turbo outputs, the CI artifact/comment paths, and .gitignore.
Replace the flat findings table with a nested layout (component heading, theme bullet, mode sub-bullet with the contrast detail) so reviewers can scan by component and drill into a theme. Cap body length under GitHub's comment size limit.
Show the component (e.g. Button) as an h4 and each story variation (e.g. Variants, As Link) as an h5 beneath it, instead of merging them into one "Button / Variants" heading. Theme/mode nesting is unchanged.
Only contrast rules (color-contrast, link-in-text-block) depend on the theme/mode, so report those per theme·mode as before. DOM-structural rules (missing alt, button/link name, ARIA, etc.) are identical across themes — collapse each to a single finding per story variation, flagged 'all themes/modes', instead of repeating it for every combination.
Disable CSS transitions/animations and await fonts before the axe sweep so contrast reads settled colors and correct large-text thresholds. Condense the verbose comments added across the a11y tooling.
4e73d0f to
8b13cff
Compare
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 an automated WCAG 2.1 AA pipeline that sweeps every Storybook story across all themes and modes from
@surfnet/tokens, in both React and Angular.What
@surfnet/storybook-config: browser-safea11yParameters(merged into both previews, also scopes the addon-a11y panel) and a node-onlyrunStoryA11yAuditbehind a./test-runnersubpath so it never enters a preview bundle.@storybook/test-runner+axe-playwrightagainst a served Storybook, so one setup covers React (Vite) and Angular (webpack). Each story is audited once per theme × mode (11 themes × 2 modes), writing a per-story JSON report.test:a11y/test:a11y:ciscripts, a turbo task, a root script, and a CI step that runs report-only (continue-on-error) and uploads the JSON as an artifact.Notes
continue-on-error.