Skip to content

v6: Add cypress-axe for full-app a11y coverage#4258

Merged
trevor-scheer merged 2 commits into
graphiql-6from
trevor/cypress-axe-baseline
May 14, 2026
Merged

v6: Add cypress-axe for full-app a11y coverage#4258
trevor-scheer merged 2 commits into
graphiql-6from
trevor/cypress-axe-baseline

Conversation

@trevor-scheer
Copy link
Copy Markdown
Contributor

Summary

Component a11y is covered by Storybook + axe; this is the full-app counterpart. cypress-axe runs 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.json pins 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 e2e flow. cypress.config.ts gets a small writeBaseline Node task so the spec can persist baseline updates from inside the browser.

Refresh baseline

yarn workspace graphiql test:a11y:update

Refs: #4219

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 14, 2026

⚠️ No Changeset found

Latest commit: 860defc

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

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
@trevor-scheer trevor-scheer force-pushed the trevor/cypress-axe-baseline branch from f70a6a8 to fcbef2c Compare May 14, 2026 18:46
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.
@trevor-scheer trevor-scheer force-pushed the trevor/cypress-axe-baseline branch from fcbef2c to 860defc Compare May 14, 2026 18:50
@github-actions
Copy link
Copy Markdown
Contributor

The latest changes of this PR are not available as canary, since there are no linked changesets for this PR.

@trevor-scheer trevor-scheer marked this pull request as ready for review May 14, 2026 20:17
@trevor-scheer trevor-scheer merged commit 53054cd into graphiql-6 May 14, 2026
13 checks passed
@trevor-scheer trevor-scheer deleted the trevor/cypress-axe-baseline branch May 14, 2026 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant