Testland
Browse all skills & agents

wcag-checklist-builder

Builds a per-component WCAG 2.2 accessibility checklist from a component spec - covers focus management, color contrast, ARIA roles & states, keyboard interaction, error handling, and live-region announcements - emitting a markdown checklist or YAML test plan that pairs with screen-reader-test-author for manual verification and the violation gate for automated scans. Use during component-spec review or pre-implementation acceptance.

Install with skills.sh (any agent)

npx skills add testland/qa --skill wcag-checklist-builder
View source

wcag-checklist-builder

Overview

A component-level a11y checklist makes acceptance criteria explicit before implementation. Without one, "is this accessible?" becomes a vague handoff between design, eng, and QA. This skill takes the component's spec (props, states, interaction model) and emits the matching WCAG 2.2 checklist.

The checklist pairs with:

  • screen-reader-test-author for manual verification.
  • a11y-violation-gate for automated scans.

When to use

  • Reviewing a component spec before implementation.
  • Building an a11y-acceptance gate at design-review time.
  • Onboarding a new component into the design system; need to retrofit a11y verification.
  • Pre-PR self-review for component contributors.

Step 1 - Identify the component archetype

The skill maps to one of these archetypes; each has its own checklist pattern:

ArchetypeExamples
Static text / displayHeading, badge, banner, blockquote.
Interactive - single triggerButton, link, icon button.
Interactive - form inputText input, checkbox, radio, select, switch.
Interactive - multi-stateDisclosure, accordion, tabs, popover.
Interactive - overlayModal, drawer, dropdown menu, command palette.
CompositeCombobox, date picker, multi-select, tree.
Live regionToast, alert, in-page status, error banner.
Layout / navigationHeader, footer, breadcrumb, pagination.

For each archetype, the matching checklist sections are below.

Step 2 - Apply the per-archetype checklist

Static text / display

  • [ ] Heading levels are sequential (h1 → h2 → h3; no skips).
  • [ ] Color contrast ≥4.5:1 (or 3:1 for large text per wcag-color-contrast).
  • [ ] Decorative-only images have empty alt=""; meaningful images have descriptive alt.
  • [ ] Information conveyed by color alone is also conveyed in another way (text, icon, pattern; SC 1.4.1).

Interactive - single trigger

  • [ ] Native <button> / <a href> used (no <div onclick>).
  • [ ] Visible focus indicator at ≥3:1 contrast vs. background.
  • [ ] Activatable via Enter (and Space for <button>).
  • [ ] Accessible name matches visible label (or is announced via aria-label / aria-labelledby if no visible label).
  • [ ] On press: announces state change if applicable (e.g. toggle button announces aria-pressed).
  • [ ] Loading / disabled states programmatically conveyed (aria-disabled / aria-busy).

Interactive - form input

  • [ ] Has a <label for="..."> OR aria-labelledby referencing a visible label.
  • [ ] Required fields marked via required (native) AND a non- color cue (text or icon).
  • [ ] Validation errors conveyed via aria-invalid="true" plus an error message linked via aria-describedby.
  • [ ] On invalid submit: focus moves to the first invalid field.
  • [ ] Autocomplete attributes set per WCAG 2.2 SC 1.3.5 (autocomplete="email", "name", etc.).
  • [ ] Placeholder is NOT used as the only label.

Interactive - multi-state (disclosure / accordion / tabs)

  • [ ] aria-expanded reflects open/closed state on the trigger.
  • [ ] aria-controls references the controlled region's id.
  • [ ] Keyboard interaction matches the APG pattern (opens in new window):
    • Disclosure: Enter/Space toggles.
    • Accordion: Tab between headers; Enter/Space toggles.
    • Tabs: Tab to active tab; Left/Right to navigate; Home/End.
  • [ ] Hidden content uses the hidden attribute or display: none (NOT visibility: hidden or opacity: 0 which leave the content focusable).

Interactive - overlay (modal / drawer / popover)

(See wcag-focus-trap for the 6-step pattern.)

  • [ ] role="dialog" (modal) OR role="alertdialog" (interrupt).
  • [ ] aria-modal="true" for modals.
  • [ ] aria-labelledby references the dialog's title.
  • [ ] On open: focus moves into the dialog.
  • [ ] Tab cycles within the dialog; doesn't escape to the page.
  • [ ] Escape closes (for non-destructive dialogs).
  • [ ] On close: focus returns to the triggering element.
  • [ ] Outside content is inert (or pre-inert focusable cycle).

Composite (combobox, date picker, multi-select)

(See aria-authoring-patterns.)

  • [ ] Match the matching APG pattern's full keyboard model.
  • [ ] aria-expanded on the trigger.
  • [ ] aria-controls linking trigger to the popup.
  • [ ] aria-activedescendant (when not moving DOM focus) OR moves DOM focus into the popup.
  • [ ] Selected state announced via aria-selected (listbox) or aria-checked (tree).
  • [ ] Type-ahead works (typing a letter focuses matching item).

Live region

  • [ ] Container has role="status" (polite) or role="alert" (assertive) OR aria-live="polite" / "assertive".
  • [ ] Container exists in the DOM before content is inserted (live regions only announce changes; pre-mounted with content suppresses the first announcement).
  • [ ] Content updates are detected - for SPA frameworks, ensure the framework's render produces a real DOM mutation rather than a virtual-DOM-only update.

Layout / navigation

  • [ ] Landmarks declared: <header> / <main> / <nav> / <footer> / <aside>. (One <main> per page.)
  • [ ] Skip-to-main-content link as the first focusable element.
  • [ ] Pagination controls have aria-label (e.g. "Pagination").
  • [ ] Breadcrumb has aria-label="Breadcrumb" and aria-current="page" on the current page.

Step 3 - Add per-component customization

Beyond the archetype defaults, the spec may declare:

  • Custom keyboard shortcuts - verify SC 2.1.4 (Character Key Shortcuts).
  • Animation / motion - verify SC 2.3.3 (Animation from Interactions) and respect prefers-reduced-motion.
  • Auto-rotating content (carousel, ticker) - pause / play control; SC 2.2.2 (Pause, Stop, Hide).
  • Time-limited interactions (countdown timer) - pause / extend control; SC 2.2.1 (Timing Adjustable).

Step 4 - Emit the artifact

The skill produces two outputs:

Manual-verification items must be emitted as concrete keystrokes and expected announcements - never as a bare skill name. The artifact ships into the user's repo and has to be runnable by a tester holding only that file. Baseline commands (per the NVDA user guide (opens in new window) and Apple VoiceOver (opens in new window); same set as screen-reader-test-author):

ActionNVDA + Firefox (Windows)VoiceOver + Safari (macOS)
Next headingHVO (Ctrl+Option) + Cmd + H
Next form fieldFVO + Cmd + J
Read next / previous itemDown / Up arrowVO + Right / Left arrow
Enter focus mode on a fieldEnter(automatic)
Activate the focused controlEnterVO + Space
Element list overlay-VO + U (web rotor)

A step passes when the announcement identifies the element type, reads the visible label verbatim, and conveys state and position-in-set where applicable.

Markdown checklist (for spec / PR review)

## A11y Checklist - `<ComponentName>`

**Archetype:** Interactive - overlay (modal)

### Required (must pass before merge)

- [ ] Modal has `role="dialog"` and `aria-modal="true"`.
- [ ] Modal title is `aria-labelledby`-referenced.
- [ ] On open: focus moves to first focusable inside modal.
- [ ] Tab cycles within modal; outside content is `inert`.
- [ ] Escape closes; focus returns to trigger.
- [ ] Close button has accessible name "Close" or "Dismiss".
- [ ] Focus indicator on close button at ≥3:1 contrast.

### Per-component (this design adds)

- [ ] Confirmation modal's "Delete" button has `aria-describedby`
      linking to the warning text.
- [ ] On confirm: live region announces "Deleted" via
      `aria-live="polite"`.

### Verification

- Automated: axe-core scan with `dialog` rule enabled.
- Manual (NVDA + Firefox, Windows): press `Enter` on the trigger -
  NVDA announces "Confirm delete, dialog"; `Tab` cycles inside the
  dialog and never reaches page content; `Escape` closes and focus
  returns to the trigger, announced as "Delete, button".
- Manual (VoiceOver + Safari, macOS): `VO`+`Space` on the trigger,
  `VO`+`Right arrow` to walk the dialog contents, `Escape` to
  close - same expected announcements.
- Code review: against the checklist above.

YAML test plan (for test-management tools)

component: ConfirmModal
archetype: overlay-modal
checks:
  - id: AC-MODAL-1
    description: Modal has role and aria-modal
    severity: blocker
    method: automated
    rule: axe::role-modal
  - id: AC-MODAL-2
    description: Focus moves to first focusable on open
    severity: blocker
    method: e2e-test
    framework: playwright
  - id: AC-MODAL-3
    description: Escape closes; focus restored
    severity: blocker
    method: e2e-test
  - id: AC-MODAL-4
    description: Live region announces "Deleted" on confirm
    severity: blocker
    method: manual
    tester_role: a11y-specialist
    instructions: >-
      NVDA + Firefox (Windows): Tab to "Delete", press Enter.
      NVDA must speak "Deleted" from the aria-live="polite" region
      without focus moving. VoiceOver + Safari (macOS): VO+Space on
      "Delete"; same announcement expected.

Anti-patterns

Anti-patternWhy it failsFix
Generic checklist for all componentsStatic text doesn't need keyboard checks; modal does.Per-archetype checklist; pick once.
Checklist created post-implementationA11y becomes a retrofit; bugs found late.Run this skill on the spec, before implementation.
Marking items "won't fix" without rationaleLoss of institutional knowledge; same item resurfaces next quarter.Document each waiver with a date + reviewer initials.
One mega-checklist per component (50+ items)Reviewer fatigue; rubber-stamping.Per-archetype defaults; only add custom items the design demands.

References

  • W3C WCAG 2.2 - https://www.w3.org/TR/WCAG22/
  • W3C ARIA Authoring Practices - apg (opens in new window).
  • Related skills: wcag-keyboard-navigation, wcag-focus-trap, wcag-color-contrast, aria-authoring-patterns, screen-reader-test-author, a11y-violation-gate.

Related skills

a11y-violation-gate

Builds a CI gate that fails the build on **new** WCAG / a11y violations introduced by a PR while grandfathering pre-existing violations on a per-rule / per-page baseline. Aggregates verdicts from axe-core / pa11y / Lighthouse a11y / WAVE / IBM Equal Access scans. Use when a project has accumulated a11y debt and a strict "zero violations" gate would block every PR - the ratchet pattern lets the team ship while preventing regressions.

aria-authoring-patterns

Reference for the W3C ARIA Authoring Practices Guide (APG) - covers the 31 canonical interactive-widget patterns (Combobox, Dialog, Menu, Tabs, Tree, etc.), their required ARIA roles and states, the keyboard-interaction model per pattern, and the canonical-violations to watch for. Use when authoring a custom interactive widget that doesn't have a native HTML equivalent, or when reviewing one for ARIA correctness.

axe-a11y

Authors and runs axe-core accessibility scans - the most-deployed open-source a11y engine - via the `axe.run()` JavaScript API or the @axe-core/playwright / @axe-core/cli wrappers, parses the `violations[]` results into per-rule severity (critical / serious / moderate / minor), configures rule disable / disable-by-tag patterns, and emits JUnit-shaped output for CI gating. Use when the project ships UI tests in JavaScript / TypeScript and wants automated a11y coverage on every PR.

ibm-equal-access-a11y

Authors and runs IBM Equal Access accessibility-checker scans - IBM's open-source a11y engine with WCAG 2.0 / 2.1 / 2.2 + US Section 508 rule sets, integrating with Node / Selenium / Puppeteer / Playwright / Karma / Cypress test runners. Distinguished by IBM's enterprise-tier rule coverage and Section 508 specificity. Use when the project ships to US federal / public-sector customers (Section 508 mandate) or when the team values IBM-branded a11y reporting.

lighthouse-a11y

Configures Lighthouse CI's Accessibility category for automated accessibility testing (a11y / WCAG coverage) - `categories:accessibility` audits backed by axe-core (axe) - with per-URL minimum-score assertions (fail a build when a page's score drops below a threshold) and per-audit overrides, distinct from the Performance category that `lighthouse-perf` covers. Use when the project already runs Lighthouse CI for Web Vitals and the team wants to add accessibility coverage in the same pipeline rather than spinning up a separate scanner.

pa11y-a11y

Authors and runs pa11y accessibility scans - a CLI / Node.js tool that wraps HTML CodeSniffer (htmlcs) and / or axe-core engines - with `pa11y {url}` invocation, reporter selection (cli / csv / json / html / tsv), WCAG standard selection (WCAG2A / WCAG2AA / WCAG2AAA), and rule ignoring. Use when the project needs scriptable a11y scans without a full test framework, or when a Node-stack project wants an alternative to direct axe-core use.

screen-reader-test-author

Builds a screen-reader test narrative - a step-by-step manual test script for NVDA (Windows), JAWS (Windows), VoiceOver (macOS / iOS), or TalkBack (Android) - that exercises a specific user flow through a component or page and captures the expected announcement at each step. Use when authoring an accessibility-acceptance test the team will run before sign-off, OR when scripting a manual a11y audit.

wave-a11y

Runs WebAIM WAVE accessibility scans via the WAVE API or the browser-extension UI - produces visual overlay of errors / alerts / structural elements directly on the page, plus categorized JSON output for CI use. Use when the team values manual-review-friendly visual feedback (the WAVE overlay) alongside automated CI scans, or when a regulatory audit requires WebAIM-branded reports.

wcag-color-contrast

Reference for WCAG 2.2 color-contrast conformance - covers SC 1.4.3 Contrast (Minimum, AA), 1.4.6 Contrast (Enhanced, AAA), 1.4.11 Non-text Contrast (AA), and 1.4.13 Content on Hover or Focus (AA) - with the canonical contrast ratios (4.5:1 normal text, 3:1 large text and UI components), measurement formula references, and bulk design-token checking patterns. Use when designing a color palette, reviewing a component for accessibility, or auditing existing CSS for contrast violations.

wcag-compliance-reporter

Builds a per-page WCAG 2.2 compliance score report by aggregating output from one or more accessibility scanners (axe-core / pa11y / lighthouse / WAVE / IBM Equal Access), pivoting violations by Success Criterion (1.4.3 contrast, 2.4.7 focus visible, etc.), grouping by conformance level (A / AA / AAA), reporting per-page coverage gaps explicitly (the "this page wasn't scanned" failure mode), and emitting both an executive summary and a per-page drill-down. Use after a multi-page accessibility scan - pa11y-ci, axe across a sitemap, lighthouse-batch - when the team needs a shareable conformance report rather than a per-page tool dump.

wcag-focus-trap

Reference for **intentional** focus management in modal / dialog / drawer / popover components - the canonical pattern that satisfies WCAG SC 2.4.3 (Focus Order) without violating SC 2.1.2 (No Keyboard Trap). Covers focus-on-open, focus-cycle-within-container, Escape-closes-and-restores, return-to-trigger, and inert-the-rest-of-the-page. Use when authoring or reviewing any component that displays content over the page (modals, drawers, popovers, command palettes).

wcag-keyboard-navigation

Reference catalog for WCAG 2.2 keyboard-navigation conformance - covers SC 2.1.1 (Keyboard), 2.1.2 (No Keyboard Trap), 2.1.4 (Character Key Shortcuts), 2.4.3 (Focus Order), 2.4.7 (Focus Visible), 2.4.11/2.4.12 (Focus Not Obscured) - with conformance levels (A/AA), test scripts, and per-criterion failure patterns. Use when authoring or reviewing keyboard-only interaction support.

widget-a11y-test-matrix

Per-widget manual accessibility test matrices where every row pairs one keystroke with the expected focus behavior, the expected NVDA announcement, the expected VoiceOver announcement, and the WCAG 2.2 success criterion that row verifies. Covers button, toggle button, checkbox, text input, modal dialog, menu button, and combobox archetypes, plus universal Tab traversal. Use when a rendered widget has cleared automated scanning and a tester needs a fill-in pass/fail sheet to run by hand against NVDA and VoiceOver.