--- name: hax-a11y-audit description: > READ-ONLY diagnostic: review authored HAX page/site content against WCAG 2.0 AA (image alt text, heading hierarchy, landmark structure, link text, form labels, color contrast, media caption/transcript/audio-description presence, keyboard/focus, ARIA correctness, data-table markup, list semantics) and emit a report with actionable HAX web-component + plain-HTML remediation. Use when the user says "is this accessible", "audit for WCAG", "check my page for accessibility", "does this meet WCAG 2.0 AA", "screen reader test", "are my images described", "is my color contrast OK", "do my videos have captions", or "accessibility audit" — even if they don't say "WCAG" or "a11y". Diagnoses only; hands off to hax-claudehax / hax-site-building for remediation and to hax-media-a11y for media-depth work. version: 1.0.0 license: MIT metadata: author: PRAW tags: [accessibility, wcag, wcag-2-0-aa, a11y, audit, hax, diagnostic, compliance, contrast, captions, screen-reader] requirements: "A HAX site path (site.json + pages/*.html) or a single page (JOS node / raw HTML / markdown). Emits a report; does NOT edit pages or site.json." --- # HAX Accessibility Audit (WCAG 2.0 AA — Read-Only Diagnostic) Review authored content on an existing HAX site/page against **WCAG 2.0 AA** and emit a diagnostic + remediation report. This skill **diagnoses and recommends only** — it does not edit pages, mutate `site.json`, or insert components. It mirrors the `hax-udl-audit` and `hax-ubd-unit-audit` pattern but operates through the WCAG lens: does the authored content meet the technical access standard for people with disabilities? ## The worldview in one paragraph WCAG 2.0 AA is an explicit HAX ecosystem pillar — the ecosystem commits to it in its community pillars and component audits — yet no existing skill audits *authored content* for it. This skill fills that gap. WCAG is about **technical access for people with disabilities**: can a screen-reader user perceive the content, can a keyboard-only user operate it, is contrast sufficient for low-vision users, are media alternatives present. This is distinct from **UDL** (pedagogical inclusivity — multiple means of reaching diverse learners), from **content chunking** (cognitive load — is the page a wall of text), and from **component-internal accessibility** (a custom element's own shadow-DOM ARIA/keyboard, which `hax-webcomponent-dev` owns). Much of WCAG remediation on a HAX site is plain HTML: alt text, semantic headings, landmark roles, link text, `scope`/`headers`/`caption` on tables. The rest maps to real HAX components that bake accessibility in. This audit reports what fails, cites the WCAG criterion, and recommends only real remediation — never an invented tag. ## When to Use **Trigger conditions:** - "Is this accessible" / "audit for WCAG" / "check my page for accessibility" - "Does this meet WCAG 2.0 AA" / "screen reader test" / "accessibility audit" - "Are my images described" / "is my color contrast OK" / "do my videos have captions" - "Can a keyboard user get through this page" / "is my heading order right" - even when the user does not say "WCAG" or "a11y" — if they question whether authored content is perceivable, operable, understandable, or robust for users with disabilities, this is the skill **When NOT to use (with redirect):** - Component-INTERNAL accessibility (a custom element's own shadow DOM ARIA/keyboard/tabindex) → `hax-webcomponent-dev` - Pedagogical inclusivity / multiple means / learner agency → `hax-udl-audit` - Page-scope cognitive load / "wall of text" / chunking → `hax-content-chunking-audit` - DDD/CSS token-usage compliance (is the DDD token used at all) → `hax-design-system` - MEDIA DEPTH (caption quality/timing/accuracy, transcript fidelity, audio-description authoring/coverage, asset production) → `hax-media-a11y` (this skill flags media caption/transcript/audio-description *presence* as a WCAG 1.2 finding and hands off to `hax-media-a11y` for depth + asset production — see the overlap rule below) - Unit alignment / backward design → `hax-ubd-unit-audit` - Cognitive level of an objective/assessment → `grad-blooms` ## Scope: this skill is READ-ONLY This skill **diagnoses and recommends only**. It produces a report. To apply remediation, hand off to the related skills and the `hax` CLI / `hax-claudehax` (see "Implementing the Recommendations" below). Never edit `pages/*.html` or `site.json` from within this skill. ## Inputs - a HAX site path: `site.json` (JOS tree) + `pages/*.html`, **or** a single page (JOS node / raw HTML / markdown) - optional `pageSlug` to scope the audit to one page (else audit every page and report site-level patterns) - optional reference to the DDD token values for contrast computation (the skill can read `d-d-d` tokens from the sibling repo if needed) ## Methodology 1. **Ingest structure.** Locate the page(s) in the HAX project: - `site.json` (JSON Outline Schema) for the node tree + metadata - `pages/.html` for rendered page content (the canonical content source) - a JOS items export or markdown representation for offline review 2. **Run the WCAG 2.0 AA checks across authored content.** For each page, evaluate: - **1.1 Text Alternatives (1.1.1):** every ``, `media-image`, `a11y-figure`, or background-image carrying information has meaningful `alt` text. Decorative images get `alt=""` (or `aria-hidden="true"` on `simple-icon-lite`) — not missing alt, not `alt="image"`. Flag both missing-alt and junk-alt (`alt="placeholder"`, `alt="arrow"`). - **1.3 Adaptable / heading hierarchy (1.3.1):** exactly one `h1` per page; no skipped levels (no `h2` → `h4`); headings used for structure, not styling. Flag the skip location. - **1.3 Adaptable / landmarks (1.3.1):** page content uses semantic landmarks (`header`, `nav`, `main`, `article`, `aside`, `footer`) or equivalent ARIA roles. Flag a page with no `main` landmark or div-soup structure. - **1.4 Distinguishable / contrast (1.4.3 text, 1.4.11 UI):** authored text and UI components meet 4.5:1 (normal text < 18pt / 14pt bold) or 3:1 (large text ≥ 18pt / 14pt bold, and UI component boundaries). Compute ratios against the DDD token values the page uses. Report the actual ratio and the token pair. (Token *usage* compliance — did the author use a DDD token at all — is `hax-design-system`'s job; *contrast checking* against token values is this skill's job.) - **2.4 Navigable / link text (2.4.4, 2.4.9):** no "click here", "read more", "learn more", or bare URLs as link text. Every link's purpose is clear from the link text alone (or link text + context). Flag each ambiguous link with its text and href. - **2.4 Navigable / focus order (2.4.3):** authored interactive markup (custom buttons, tabbed interfaces, collapsible sections) is keyboard-reachable in a logical order. Flag `tabindex` values that are positive (anti-pattern) or authored elements that lack keyboard access. - **3.3 Input Assistance / form labels (3.3.2):** every authored form field has a programmatic label (`