accessibility-audit
Use when auditing UI components or pages for accessibility compliance, checking WCAG conformance, identifying keyboard navigation issues, color contrast problems, and pre-launch accessibility verification
- License 许可
- MIT
- 最近更新
- 2026-08-20
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- accessibility-audit
- tags
- [ "ui", "code-quality" ]
- tools
- []
- version
- 1.0.0
- agent_types
- [ "planner", "worker", "reviewer" ]
- description
- Use when auditing UI components or pages for accessibility compliance, checking WCAG conformance, identifying keyboard navigation issues, color contrast problems, and pre-launch accessibility verification
- dependencies
- []
03 SKILL.md 正文
Accessibility Audit
Iron Laws
<EXTREMELY-IMPORTANT>
- Keyboard = primary UX. If a feature isn't keyboard-accessible, it doesn't exist for some users.
- Meet the applicable WCAG contrast target. Use 4.5:1 for normal text, 3:1 for large text, and the relevant non-text contrast criteria; verify rather than invent exceptions.
- All interactive elements need focus states.
:focus-visibleis the standard. - Controls need accessible names. Prefer a native
<label>for form controls; use an equivalent programmatic label such asaria-labelledbywhen appropriate, then verify the association. - Screen reader testing is not optional.
aria-labelhelps but doesn't replace real testing. </EXTREMELY-IMPORTANT>
When to Use
Pre-launch audit; checking WCAG conformance; keyboard nav issues; color contrast problems; IMAGE/button missing alt text; form validation; dynamic content updates.
WCAG Basics
| Level | What |
|---|---|
| A | Minimum. Keyboard access, alt text, captions. |
| AA | Standard. Color contrast ≥ 4.5:1, error identification. |
| AAA | Advanced. Enhanced contrast, sign language. |
Target AA for most projects. A is for emergencies.
Common Issues and Fixes
| Issue | WCAG | Fix |
|---|---|---|
| No alt text | 1.1.1 | alt="description" or role="presentation" |
| Low contrast | 1.4.3 | Adjust colors, ≥ 4.5:1 body, ≥ 3:1 large |
| Keyboard trap | 2.1.2 | Allow focus to exit (Tab, Escape) |
| Missing labels | 3.3.2 | <label for="input"> |
| Focus state missing | 2.4.7 | :focus-visible on all interactive |
| Live region missing | 4.1.3 | aria-live="polite" for dynamic content |
| Error not announced | 4.1.3 | role="alert" or aria-errormessage |
| Skip nav missing | 2.4.1 | Skip link to main content |
Audit Workflow
- Keyboard audit. Tab through every interactive element. Can you navigate all of it?
- Contrast audit. Grab colors, check against spec. Fix violators.
- Screen reader audit. VoiceOver (macOS) or NVDA (Windows). Can you use the app?
- Focus audit. Every button, link, input needs a visible
:focus-visiblestate. - Name audit. Every control has an accessible name through native markup or an appropriate programmatic label. Every button has text or an accessible name.
- Dynamic content audit. Alerts, notifications, loading states have
aria-live.
Common Mistakes
Color contrast checked manually (use a checker); alt text on decorative images (use role="presentation"); aria-label everywhere (use proper html); keyboard-only mode ignored; missing focus states; "I'll fix a11y later" (do it now); testing only desktop (test mobile); "the validator passed" (automated check catches < 30% of issues); screen reader testing skipped; "it's a component library, it's accessible" (verify); dynamic content without live regions.
Red Flags
No keyboard audit; <div onClick={...}> without role="button" + tabindex; missing :focus-visible; aria-label="..." without proper html; "a11y later"; no screen reader test; normal-text contrast < 4.5:1 or large-text contrast < 3:1; controls without accessible names; dynamic content without live regions; skip nav missing; "the tool said it's fine" (automated misses real issues).
04 同仓库更多 Skills
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment - applies TDD to process documentation by testing with subagents before writing, iterating until bulletproof against rationalization. Includes complete pressure testing methodology.
verification-before-completion
Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always
typescript-coding-standards
Use when writing, refactoring, or reviewing TypeScript code that needs strong domain modeling, typed errors, schema parsing, safe adapters, test seams, or maintainable module boundaries.
test-driven-development
Use when implementing a feature, bugfix, or behavior-changing refactor — require a failing behavior test before production code, then make the smallest change that passes.
source-driven-development
Use when unfamiliar libraries, dependency internals, external APIs, framework behavior, migrations, or current ecosystem guidance require official documentation, version-matched source, read the tests, and cited evidence.
security-and-hardening
Use when auditing security, implementing authentication or authorization, handling secrets, or validating data across external trust boundaries.