vanessamarely/ai-playbook-reposito/a11y-audit-react

Claude Code and agent skill by vanessamarely/ai-playbook-reposito

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Audit React components for WCAG 2.2 compliance and suggest fixes. Use for accessibility audits of React/TypeScript component files or directories.

Install

npx vskill@latest install vanessamarely/ai-playbook-reposito/a11y-audit-react

SKILL.md

The same SKILL.md was published earlier as vanessamarely/ai-playbook-reposito/a11y-audit-react.

Accessibility Audit Agent (React)

Purpose

Identify accessibility violations in React components and provide actionable remediation steps aligned with WCAG 2.2 Level AA.

Inputs

  • targetPath: Path to component file(s) or directory to audit.
  • auditScope: single-file, directory, or full-project.

Outputs

  • Summary of violations with severity (critical, serious, moderate, minor).
  • Actionable code fixes with minimal diffs.
  • Verification commands to test changes.

Procedure

Step 1: Validate Scope
  1. Verify targetPath exists.
  2. Determine file(s) to audit based on auditScope.
  3. Filter for .tsx and .jsx files.
Step 2: Run Automated Lint

Execute: .github/skills/a11y-automation/scripts/run-a11y-lint.sh <targetPath>

Capture output.

If eslint-plugin-jsx-a11y is configured, parse violations.

Step 3: Load WCAG Guidelines

Read: .github/skills/react-components/references/a11y-wcag22.md

Use as reference for manual inspection.

Step 4: Analyze Each Component

For each component file:

  1. Semantic HTML Check
  • Detect use of <div> or <span> for buttons/links.
  • Flag missing landmarks (<header>, <nav>, <main>, <footer>).
  1. Keyboard Navigation Check
  • Verify interactive elements have onClick and onKeyDown handlers.
  • Check for keyboard traps in modals or focus-managed sections.
  1. ARIA Usage Check
  • Identify missing aria-label or aria-labelledby on icon buttons.
  • Detect invalid ARIA attribute combinations.
  • Flag redundant ARIA on semantic elements.
  1. Focus Management Check
  • Verify modals trap focus and restore on close.
  • Check that dynamic content updates announce via aria-live if needed.
  1. Contrast and Motion Check
  • Flag hardcoded colors that may violate contrast ratios (suggest calculation).
  • Detect animations without prefers-reduced-motion support.
Step 5: Categorize Violations

Assign severity:

  • Critical: Component is unusable via keyboard or screen reader.
  • Serious: Missing required ARIA or semantic structure.
  • Moderate: Suboptimal patterns that hinder usability.
  • Minor: Best practice improvements.
Step 6: Summarize Findings

Output to chat:

  • Summary statistics (total issues, by severity).
  • Per-file breakdown with line numbers.
  • Brief description of each violation.
Step 7: Propose Fixes

For each violation:

  1. Show the problematic code snippet.
  2. Provide corrected version with minimal changes.
  3. Explain the accessibility benefit.

Apply fixes using minimal diffs.

Step 8: Suggest Automated Tests

If Playwright is available:

  • Reference .github/skills/a11y-automation/scripts/run-axe-playwright.mjs.
  • Suggest integrating axe checks into the test suite.

Error Handling

  • No React files found: Notify and exit.
  • Linter not configured: Provide setup instructions for eslint-plugin-jsx-a11y.
  • Unable to parse code: Report syntax errors and suggest fixing before audit.

Accessibility Checklist

Quick reference for WCAG 2.2 AA compliance.

Essential Checks
Keyboard Navigation
  • [ ] All interactive elements focusable via Tab key
  • [ ] Focus order follows visual/logical order
  • [ ] Focus is visible (outline/ring on focused elements)
  • [ ] Custom widgets have keyboard support (Enter to activate, Escape to close)
  • [ ] No keyboard traps (user can always Tab away from a component)
  • [ ] Skip-to-content link at top of page
  • [ ] Modals trap focus while open, return focus on close
Screen Readers
  • [ ] All images have alt text (or alt="" for decorative images)
  • [ ] All form inputs have associated labels (<label> or aria-label)
  • [ ] Buttons and links have descriptive text (not "Click here")
  • [ ] Icon-only buttons have aria-label
  • [ ] Page has one <h1> and headings don't skip levels
  • [ ] Dynamic content changes announced (aria-live regions)
  • [ ] Tables have <th> headers with scope
Visual
  • [ ] Text contrast ≥ 4.5:1 (normal text) or ≥ 3:1 (large text, 18px+)
  • [ ] UI components contrast ≥ 3:1 against background
  • [ ] Color is not the only way to convey information
  • [ ] Text resizable to 200% without breaking layout
  • [ ] No content that flashes more than 3 times per second
Forms
  • [ ] Every input has a visible label
  • [ ] Required fields indicated (not by color alone)
  • [ ] Error messages specific and associated with the field
  • [ ] Error state visible by more than color (icon, text, border)
  • [ ] Form submission errors summarized and focusable
Common Anti-Patterns
Anti-PatternProblemFix
div as buttonNot focusable, no keyboard supportUse <button>
Missing alt textImages invisible to screen readersAdd descriptive alt
Color-only statesInvisible to color-blind usersAdd icons, text, or patterns
Autoplaying mediaDisorienting, can't be stoppedAdd controls, don't autoplay
Custom dropdown with no ARIAUnusable by keyboard/screen readerUse native <select> or proper ARIA listbox
Removing focus outlinesUsers can't see where they areStyle outlines, don't remove them
Empty links/buttons"Link" announced with no descriptionAdd text or aria-label
tabindex > 0Breaks natural tab orderUse tabindex="0" or -1 only

Related

  • Canonical Claude Code source: .claude/agents/a11y-audit-react.md
  • Copilot custom agent equivalent: .github/agents/a11y-audit-react.agent.md
  • Related skills: .github/skills/a11y-automation/SKILL.md, .github/skills/react-components/SKILL.md

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/vanessamarely/ai-playbook-reposito/a11y-audit-react/badge)](https://verified-skill.com/skills/vanessamarely/ai-playbook-reposito/a11y-audit-react)

Something wrong with this skill or its page? Tell us.