chore(a11y): add automated axe-core accessibility CI workflow - #654
Draft
stijnmoreels wants to merge 6 commits into
Draft
chore(a11y): add automated axe-core accessibility CI workflow#654stijnmoreels wants to merge 6 commits into
stijnmoreels wants to merge 6 commits into
Conversation
Adds a Cypress-based accessibility check (cypress-axe) that scans a representative page per template (home, a standard doc page, a deprecated-content page, a migration guide, and the interactive release-notes filter/collapse widgets) against WCAG 2.0/2.1/2.2 A/AA rules, failing the build only on critical/serious violations. Runs on push/PR to master/main via .github/workflows/accessibility.yml, following the existing doc-tests.yml conventions (pnpm/action-setup + npm install + start-server-and-test). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
✅ Deploy Preview for invictus-for-azure ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
The general doc-tests.yml workflow runs 'npm run test' -> cy:run -> 'cypress run' with no --spec filter, which auto-discovers every spec in cypress/e2e/, including the new accessibility.cy.js. That meant the axe-core scan was running twice per PR (once in doc-tests.yml, once in the dedicated accessibility.yml) and would also fail the general doc-tests build on any a11y violation, which isn't its job. - Move the accessibility spec into its own cypress/e2e/accessibility/ subfolder so it's clearly separated from the functional specs. - Scope the 'cy:run' npm script (used by doc-tests.yml) to 'cypress/e2e/*.cy.js' (top-level only), so it only picks up the 5 functional specs and skips the accessibility subfolder. - accessibility.yml continues to target the spec directly via its own explicit --spec path, unaffected by the cy:run scoping. Verified locally: 'npm run cy:run' picks up only the 5 functional specs (137/137 passing) and skips accessibility.cy.js entirely; running the accessibility spec directly via its new path still works and correctly flags the known/deferred SearchBar contrast issue. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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 accessibility check so WCAG/manual audits don't have to be repeated by hand each time.