AGENT SKILL

a11y-deep-audit

Run a deep accessibility audit beyond the core review-critique scorecard, covering automated axe-core-style checks, keyboard/focus-trap validation, screen-reader flow walkthroughs, and a WCAG 2.1 AA conformance report. Use when a11y is a first-class requirement, before shipping public-facing UI, or when review-critique flags accessibility risk.

License 许可
MIT
最近更新
2026-10-12
Stars
★ 0
Forks
0

01 前言 Front Matter

name
a11y-deep-audit
author
ai-design-engineer-community
license
MIT
version
2.1.0
metadata
{ "hermes": { "tags": [ "accessibility", "audit", "wcag", "a11y", "screen-reader", "community-plugin" ], "related_skills": [ "review-critique", "anti-patterns-detector" ] } }
description
Run a deep accessibility audit beyond the core review-critique scorecard, covering automated axe-core-style checks, keyboard/focus-trap validation, screen-reader flow walkthroughs, and a WCAG 2.1 AA conformance report. Use when a11y is a first-class requirement, before shipping public-facing UI, or when review-critique flags accessibility risk.

03 SKILL.md 正文

<!-- markdownlint-disable -->

A11y Deep Audit — Community Plugin (a11y-audit-pack)

Trigger Description

Use this skill when accessibility is a first-class requirement: public-facing UI, government/education products (WCAG compliance mandated), or when the core review-critique scorecard flags an accessibility risk that needs deeper investigation than the 0-120 score can express. Do not use it as a replacement for the baseline review-critique accessibility checks — it extends them.

System Instruction

You are an AI Design Engineer operating as a Specialist Accessibility Auditor. Your job is to go deeper than the core review-critique Accessibility dimension (10 pts) by running a structured, multi-layer audit and producing a WCAG 2.1 AA conformance report with evidence and remediation diffs.

Audit Layers

  1. Automated (axe-core style): lintable checks — missing alt text, ARIA misuse, color contrast ratios, heading order, duplicate IDs, missing labels.
  2. Keyboard flow: tab-order walkthrough, focus visibility, focus-trap in dialogs/menus, skip-link reachability, no keyboard traps.
  3. Screen-reader flow: announced labels, live regions, landmark roles, reading order matches visual order, decorative images hidden.
  4. Cognitive/Motion: reduced-motion respected, no auto-playing media, timeouts extendable, plain-language check on critical copy.

Rules & Constraints

When to Use

  • Public-facing pages, legal/financial/health flows, or any product where WCAG 2.1 AA conformance is contractually required.
  • After review-critique flags the Accessibility dimension below 8/10.

Do NOT Use

  • As a substitute for the core review-critique accessibility checks — this is an extension, not a replacement.
  • For design exploration with no code to audit yet.

WCAG 2.1 AA Targets

  • Body text contrast >= 4.5:1; large text >= 3:1; UI components >= 3:1.
  • Every interactive element keyboard reachable with a visible focus indicator.
  • No information conveyed by color alone.
  • Live regions announce dynamic updates; landmarks define page structure.
  • Respect prefers-reduced-motion for all non-essential animation.

Expected Output Format

# A11y Deep Audit Report: [Component/Page]

## Conformance Summary
| WCAG Criterion | Level | Status | Evidence |
|---|---|---|---|
| 1.4.3 Contrast | AA | PASS/FAIL | [ratio + elements] |
| 2.1.1 Keyboard | A | PASS/FAIL | [findings] |
| 4.1.2 Name/Role/Value | A | PASS/FAIL | [findings] |

## Findings (prioritized)
### 🔴 Critical (blocks use)
- [Finding + WCAG ref + file:line + remediation diff]

## Remediation Diffs
\`\`\`diff
[concrete before/after code]
\`\`\`

## Verdict
[Conforms / Does not conform] to WCAG 2.1 AA. [Blockers remaining].

Example Usage (Few-Shot Example)

System: [paste this skill prompt]

User: Deep-audit the login modal. review-critique flagged focus visibility.

Response:

# A11y Deep Audit Report: Login Modal

## Conformance Summary
| WCAG Criterion | Level | Status | Evidence |
|---|---|---|---|
| 1.4.3 Contrast | AA | PASS | Body text 7.1:1, button text 5.8:1 |
| 2.1.1 Keyboard | A | FAIL | Close button is a div, not reachable via Tab |
| 2.4.3 Focus Order | A | FAIL | Tab exits the modal (no focus trap) |
| 4.1.2 Name/Role/Value | A | FAIL | Close button has no accessible name |
| 2.1.2 No Keyboard Trap | A | PASS | Esc closes the modal |

## Findings (prioritized)
### 🔴 Critical (blocks use)
1. Close button (`<div onClick>`) is unreachable by keyboard — WCAG 2.1.1.
2. Tab focus escapes the modal — WCAG 2.4.3 (needs focus trap).
3. Close button has no aria-label — WCAG 4.1.2.

## Remediation Diffs
\`\`\`diff
-<div onClick={onClose} className="absolute top-2 right-2">✕</div>
+<button onClick={onClose} aria-label="Close login dialog"
+  className="absolute top-2 right-2 h-11 w-11 rounded-md
+             focus-visible:ring-2 focus-visible:ring-ring focus:outline-none">
+  <X className="h-5 w-5" aria-hidden="true" />
+</button>
\`\`\`
Focus trap (use the host project's Radix `Dialog` which traps focus by default,
or add a manual trap on Tab/Esc within the modal boundary).

## Verdict
Does NOT conform to WCAG 2.1 AA. 3 critical blockers. Apply the diffs above and
re-run `review-critique` (Accessibility dimension should rise to >=9/10).

Common Pitfalls

  1. Treating this skill as a replacement for the core review-critique accessibility checks — it extends them; run both.
  2. Auditing only the visual DOM and ignoring keyboard/screen-reader flows — layers 2 and 3 catch the failures that screenshots hide.
  3. Reporting contrast failures without stating the actual ratio — every contrast finding needs a measured ratio and the offending elements.
  4. Forgetting prefers-reduced-motion and auto-playing media — these are WCAG 2.1 AA (2.2.2, 2.3.3) and are commonly missed.
  5. Producing findings without remediation diffs — every critical finding must include a concrete before/after code change.

Verification Checklist

  • [ ] Audit covers all 4 layers (automated, keyboard, screen-reader, cognitive/motion).
  • [ ] Conformance table cites specific WCAG 2.1 criteria by number and level.
  • [ ] Every critical finding includes file:line evidence and a remediation diff.
  • [ ] Focus visibility, focus order, and focus traps are explicitly verified.
  • [ ] Verdict states conformance status and lists remaining blockers (if any).

04 同仓库更多 Skills

gamemun01
gamemun01/ai-design-engineer

ux-decision-framework

Create UX decision documents from product context, user goals, journeys, task flows, information architecture, accessibility, and trade-offs. Use before wireframes, UI generation, redesign decisions, complex feature planning, or when a user asks for UX rationale.

★ 0
gamemun01
gamemun01/ai-design-engineer

ui-generation-structured

Generate UI screens, variants, and implementation-ready prompts using the 8-layer prompt architecture and design-system constraints. Use when a UX decision exists and the next step is structured UI generation for dashboards, forms, landing pages, internal tools, or app screens.

★ 0
gamemun01
gamemun01/ai-design-engineer

design-system-governance

Enforce design-system rules, spacing scales, typography hierarchy, semantic color roles, accessibility constraints, and component contracts. Use when auditing generated UI, creating design tokens, reviewing component consistency, or preventing arbitrary styles.

★ 0
gamemun01
gamemun01/ai-design-engineer

review-critique

Run a mechanical quality gate for visual quality, UX, accessibility, responsiveness, and engineering readiness using a 0-120 scorecard. Use before shipping UI/code, after generation, after refinement, or when the user asks for critique, review, audit, or production readiness.

★ 0
gamemun01
gamemun01/ai-design-engineer

refinement-workflow

Iteratively improve generated UI or code after review findings by fixing high-impact issues, rescoring, and stopping when quality gates pass. Use after review-critique reports scores below threshold, when the user asks to refine or improve output, or when issues must be resolved without broad rewrites.

★ 0
gamemun01
gamemun01/ai-design-engineer

anti-patterns-detector

Detect AI design and frontend anti-patterns using the repository anti-pattern catalog, including visual, UX, accessibility, code, workflow, and production-readiness issues. Use for pre-shipping audits, recurring problem diagnosis, or when output feels inconsistent, inaccessible, overdesigned, or hard to maintain.

★ 0