v6: Add cypress-axe for full-app a11y coverage#4258
Merged
Conversation
|
Component a11y is covered by Storybook + axe; this hooks `cypress-axe` into the existing Cypress suite to scan the full GraphiQL UI at four checkpoints (initial render, after running a query, with the docs panel open, with the history panel open). `cypress/.a11y-baseline.json` pins today's accepted violations; CI fails on net-new only. A small `writeBaseline` Node task in `cypress.config.ts` lets the spec persist updates — Cypress runs in the browser, so it can't `fs.writeFileSync` directly. Refresh: yarn workspace graphiql test:a11y:update
f70a6a8 to
fcbef2c
Compare
Node counts drift between local Electron-on-macOS and CI headless-Chromium-on-Linux for the same underlying violations, so the count was failing CI on diffs that aren't really diffs. id-only is the conventional baseline shape anyway.
fcbef2c to
860defc
Compare
Contributor
|
The latest changes of this PR are not available as canary, since there are no linked |
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.
Summary
Component a11y is covered by Storybook + axe; this is the full-app counterpart.
cypress-axeruns axe at four checkpoints during a normal session (initial render, after running a query, with the docs panel open, with the history panel open) and gates PRs against a committed baseline.cypress/.a11y-baseline.jsonpins today's accepted violations — color-contrast in several spots, a couple of nested-interactive cases, link-in-text-block in the docs panel. CI fails on net-new only.The spec lives alongside the existing Cypress suite, so it runs as part of the normal
yarn e2eflow.cypress.config.tsgets a smallwriteBaselineNode task so the spec can persist baseline updates from inside the browser.Refresh baseline
Refs: #4219