chore(atomic-a11y): add a11y scripts, overrides, and report templates#7125
chore(atomic-a11y): add a11y scripts, overrides, and report templates#7125y-lakhdar wants to merge 7 commits intofeat/a11y-openacrfrom
Conversation
- Add scripts/ai-wcag-audit.ts for LLM-powered WCAG compliance auditing - Add scripts/generate-a11y-issues.ts for generating GitHub issues from reports - Add scripts/manual-audit-delta.ts for computing manual audit deltas - Add scripts/vpat-from-openacr.handlebars template for VPAT generation - Add a11y-overrides.json for per-criterion conformance overrides - Add reports/deltas/ directory with example delta file
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 413369fd80
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const pattern = | ||
| /\/src\/components\/(?:commerce|search|insight|ipx|recommendations)\/([^/]+)\//; | ||
| const match = importPath.match(pattern); |
There was a problem hiding this comment.
Extract leaf component folder from story import paths
The current regex captures only the first directory after the surface segment, so nested stories like .../src/components/search/facets/atomic-facet/... resolve to facets instead of the actual component tag. Because selectStories later deduplicates by this extracted name, many components are collapsed into one audit target and --component <tag> filtering misses valid components, which materially undercounts audited coverage and failures.
Useful? React with 👍 / 👎.
| status: 'complete', | ||
| tier: 2, | ||
| keyboardNav: results.keyboardNav ?? 'not-applicable', | ||
| screenReader: results.screenReader ?? 'pass', |
There was a problem hiding this comment.
Do not default untested screen-reader checks to pass
When a delta adds a new component and omits results.screenReader (which happens for AI-only deltas that only include WCAG 2.2 criteria), merge writes manual.screenReader as pass. This records compliance without any test evidence and can hide real accessibility regressions in downstream baseline/OpenACR reporting for newly introduced components.
Useful? React with 👍 / 👎.
DELTA_PATTERN and VALID_STATUSES were deferred from the foundation PR since their first consumers are the scripts in this branch.
Context
CLI scripts that automate a11y workflows on top of the reporter and OpenACR converter from previous PRs. These are developer-facing tools in
scripts/(outsidesrc/).What this PR does
Three scripts:
ai-wcag-audit.ts— LLM-based WCAG auditing. Launches Playwright for each Storybook component, captures screenshots + a11y trees, evaluates with OpenAI for criteria axe-core can't check.generate-a11y-issues.ts— Creates GitHub issues from a11y report violations, grouped by WCAG criterion.manual-audit-delta.ts— Diffs manual audit baselines to track regressions/improvements.Also:
a11y-overrides.json(conformance overrides),vpat-from-openacr.handlebars(VPAT template),reports/deltas/(delta examples).Try it
PR Chain (5 of 7)
feat/a11y-package-scaffoldfeat/a11y-shared-foundationfeat/a11y-reporterfeat/a11y-openacrfeat/a11y-scriptsfeat/a11y-reporter-wiringfeat/a11y-ci-integrationKIT-5471