Add a11y-matrix to Tools - #276
Open
henriqueyuri00 wants to merge 1 commit into
Open
Conversation
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 a11y-matrix to the Tools table.
Disclosure: I built this. Completely fine to close if self-submissions aren't welcome here.
Against the contributing guidelines
What it is
A CLI and GitHub Action that runs axe-core across the browser states a single CI run never enters:
prefers-color-scheme: dark,prefers-reduced-motion: reduce,forced-colors: active, a mobile viewport, and the 320px width WCAG 1.4.10 requires. Each state changes exactly one variable away from the baseline, so a finding is attributed to the preference that caused it rather than reported as an anonymous count.Why it might be worth listing
It came out of a defect I shipped: a button label at 1:1 contrast against its own background — invisible — in dark mode only, with a green pipeline throughout.
Two things were going on, and the second is the reason the tool exists:
incomplete, not as a violation, because it cannot prove the element was not deliberately hidden. Pipelines assert onviolationsand discardincomplete, so the most severe contrast defect there is lands in the bucket nobody reads.It also measures reflow directly (document
scrollWidthagainst viewport width) rather than inferring it, since axe has no rule for 1.4.10 — and it suppresses the "partially obscured" contrast result when the element is merely scrolled out of view inside a keyboard-reachable scroll container, which is the sanctioned way to present a wide data table at 320px. The suppression count and reason are always printed.Free, MIT, no account, no telemetry. Runs with
npx github:henriqueyuri00/a11y-matrix <url>. CI exercises the composite action for real: a deliberately broken fixture must fail the build and a clean one must not.