Accessibility test toolkit

WCAG data

a11ied ships WCAG 2.1 and 2.2 as generated artifacts inside the package. Criterion lookup, search, coverage, and applicability all read those files, so none of them makes a network request at runtime.

Upstream

Upstream sources

The Web Content Accessibility Guidelines (WCAG) are the standard most accessibility requirements come from. WCAG states its rules as success criteria: numbered, testable requirements such as 1.4.3, each assigned a conformance level of A, AA, or AAA that says how strict the requirement is. a11ied pins four upstream sources for WCAG 2.1 and 2.2 and merges them into one record per criterion.

W3C WCAG 2.1 and 2.2 Criterion IDs, titles, levels, normative text, techniques, and failures.
W3C ACT rule mapping Machine-readable rule to criterion coverage from the Accessibility Conformance Testing (ACT) rules.
W3C Quickref tags Topic tags per criterion. Applicability matches page signals against these.
axe-core Rule IDs, WCAG tags, and ACT rule IDs read from the installed package. axe-core (axe) is an open-source rules engine, not something this project built. It runs inside the page and checks it against a set of automated accessibility rules.

Coverage says how much of a criterion a11ied's own checks can resolve without a person, from automated to manual. See coverage for the four states. Each record lists the sources that produced it under sourceAttribution, so you can tell an ACT mapping from a heuristic.

Generated artifacts

The sync step fetches the raw upstream payloads into an ignored directory, then generates normalized artifacts per version. The generated set is committed and ships in the package, so a build never reaches the network.

criteriaFull criterion records with techniques and failures.
criteria-by-levelCriterion IDs grouped by A, AA, and AAA.
test-methodsTest method (method) and mapped rule IDs per criterion.
test-method-summaryCount of automated, hybrid, and manual criteria per level, source counts, and representative IDs.
strategyPreferred test method, procedure IDs, and whether the page must be open in a browser or screen reader (requiresRealTarget).
slug-indexSlug to criterion ID. Every lookup by slug reads it.
technique-index, failure-index
Technique or failure ID to its title, W3C page URL, and the criteria that list it. a1 wcag G18 reads them.
axe-rulesaxe rule ID to its tags, ACT rule IDs, and the criteria it maps to. a1 wcag rule reads it.
understandingEach criterion's Understanding document, converted to Markdown, with its title, URL, and status. a1 wcag understanding reads it.
technique-bodiesEach technique and failure's page body, converted to Markdown. a1 wcag G18 reads it when one was synced.
documents-contentThe converted document bodies, one copy per distinct body, shared by understanding and technique-bodies.
mobile-guidanceWhat WCAG2Mobile says about each criterion it covers, with the document's own notes and examples. a1 wcag show reads it. Not version-scoped: one file serves 2.1 and 2.2.

Shape

A criterion record

a1 wcag show 1.4.3 --json
"result": {
  "lookupKey": "1.4.3",
  "criterion": {
    "id": "1.4.3",
    "slug": "contrast-minimum",
    "title": "Contrast (Minimum)",
    "level": "AA",
    "wcagVersion": "2.2",
    "summary": "The visual presentation of text and images of text has a contrast ratio of at least 4.5:1, except for the following:",
    "understandingUrl": "https://www.w3.org/WAI/WCAG22/Understanding/contrast-minimum",
    "versions": ["2.0", "2.1", "2.2"],
    "tags": ["buttons", "color", "content", "contrast", "errors", "focus", "forms", "images-of-text", "messaging", "navigation", "text"],
    "principle": { "id": "perceivable", "number": "1", "title": "Perceivable" },
    "guideline": { "id": "distinguishable", "number": "1.4", "title": "Distinguishable" }
  },
  "testMethod": { "criterionId": "1.4.3", "method": "automated", "..." : "..." },
  "strategy": { "criterionId": "1.4.3", "preferredEvidenceMode": "hybrid", "..." : "..." }
}

result.criterion also includes normativeText as HTML, a parsed details list for the exceptions, altIds for older slugs, and the resolved techniques, advisoryTechniques, and failures. Each technique has an id, a title, a technology, and a url to its W3C page.

versions says which WCAG releases contain the criterion. See test methods for what result.testMethod and result.strategy hold.

The Understanding document and the technique body are in the data too, converted from HTML to Markdown and stored under understanding.<version>.json and technique-bodies.<version>.json. a1 wcag understanding 1.4.3 prints the full document, and a1 wcag show 1.4.3 prints its In Brief or Intent opening with a link to the rest.

result.mobileGuidance holds what WCAG2Mobile, the Mobile Accessibility Task Force's guidance on applying WCAG 2.2 to mobile applications, says about the criterion: whether it applies as written, which web terms mobile substitutes, and the document's notes and examples. It covers Level A and AA, so a Level AAA criterion has no entry, and a criterion the task force has not written up yet has an entry whose state is placeholder with a link to the open issue. WCAG2Mobile is an Editor's Draft: informative guidance, not a W3C Recommendation.

understandingUrl and a technique's url still go to the original W3C page. The W3C Document License permits this conversion to help implementation, and the package ships a NOTICE.md with the required W3C attribution. Every command that prints this material also prints a line that gives the source document's title and URL.

Maintenance

Refreshing the data

From the repository root, npm run wcag:sync pulls the upstream payloads and regenerates the artifacts. npm run wcag:validate checks them against the provenance manifests and the regression fixtures.

Review the generated diff before committing. Both commands are for maintainers. Nothing in normal use of the CLI, MCP server, or API triggers a sync.