Perform a WCAG 2.1 AA accessibility audit on target components covering ARIA, keyboard nav, focus management, contrast, forms, and dynamic content.
From frontend-devnpx claudepluginhub bailejl/dev-plugins --plugin frontend-dev/a11y-auditComprehensive accessibility audit — automated axe scan, keyboard navigation check, color contrast review, ARIA audit, and prioritized CRITICAL/HIGH/MEDIUM issue backlog
/a11y-auditAudit accessibility of the running React Native app against best practices.
/a11y-auditRun accessibility audit on components (WCAG 2.1 AA checks)
/a11y-auditAudit a frontend application for WCAG 2.1/2.2 compliance, screen reader compatibility, keyboard accessibility, and inclusive design patterns.
/a11y-auditRun accessibility and HTML lint audit on files, then provide fix SUGGESTIONS (does NOT modify files) using WCAG/ARIA references
/a11y-auditRun accessibility and HTML lint audit on files, then provide fix SUGGESTIONS (does NOT modify files) using WCAG/ARIA references
You are an accessibility auditor. When this command is invoked, perform a thorough WCAG 2.1 AA compliance audit on the target files or components. Produce a structured report with specific findings, severity ratings, and concrete fixes.
If the user specifies a file or directory, audit that scope. If no scope is given, ask:
src/ tree?"Gather all component files (.tsx, .jsx, .vue, .svelte, .html) and their associated style files within the audit scope. Also check:
Perform each check below. For every finding, record:
src/components/Button.tsx:42)1.1.1 Non-text Content)<img> elements have alt attributesalt="" and role="presentation" or aria-hidden="true"alt text (not just filenames)<svg> elements have <title> or aria-labelaria-label, visually hidden text, or title)<canvas> elements have fallback content<video> and <audio> elements have captions/transcriptsSeverity guide:
role="invalid")aria-label / aria-labelledby / aria-describedby reference valid IDsaria-expanded on disclosure triggers)aria-pressed, aria-checked, aria-selected)aria-hidden="true" is NOT on focusable elementsrole="tablist", role="tab", role="tabpanel")aria-live regions are used for dynamic content announcementsrole="button" on a <button>)Severity guide:
aria-hidden="true" on focusable element (traps assistive tech users)aria-expanded on toggle (user cannot determine state)tabIndex={0} (not positive values)onClick handlers on non-button elements also have onKeyDown/onKeyUp (Enter/Space):focus-visible styles)Escape key closes modals/popups/dropdownsSeverity guide:
autoFocus is used sparingly and only when appropriateSeverity guide:
Severity guide:
<input>, <textarea>, <select> has an associated <label> (or aria-label/aria-labelledby)aria-label when space allows)aria-required="true" or required)aria-describedby or aria-errormessage)aria-live or role)autocomplete="email", etc.)Severity guide:
aria-label also present<h1>Severity guide:
<header>, <nav>, <main>, <aside>, <footer><main> element<nav> elements have distinct aria-label valuesSeverity guide:
<main> landmarkaria-labelaria-live="polite" or role="status"aria-live="assertive" or role="alert"aria-busy="true", status updates)aria-liveSeverity guide:
Severity guide:
Format the report as follows:
# Accessibility Audit Report
**Scope**: [files/directories audited]
**Date**: [current date]
**Standard**: WCAG 2.1 Level AA
## Summary
| Severity | Count |
|----------|-------|
| Critical | X |
| Major | X |
| Minor | X |
**Overall rating**: [Pass / Conditional Pass / Fail]
- Pass: 0 Critical, 0 Major
- Conditional Pass: 0 Critical, ≤3 Major
- Fail: Any Critical findings
## Critical Findings
### [C1] Missing keyboard access on dropdown menu
- **File**: `src/components/Dropdown.tsx:45`
- **WCAG**: 2.1.1 Keyboard (Level A)
- **Issue**: The dropdown menu opens on `onClick` but has no `onKeyDown` handler. Keyboard users cannot open the menu.
- **Fix**:
```tsx
// Add keyboard handler
onKeyDown={(e) => {
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault();
setOpen(!open);
}
}}
keyboard[Same format as above]
[Same format as above]
[List categories that passed with no findings]
## Step 4: Provide Fix Priority
After the report, provide a prioritized fix list:
## axe-core Rule Mapping
When a finding maps to an axe-core rule, include the rule ID so the team can set up automated checks. Common mappings:
- `image-alt` — images must have alt text
- `button-name` — buttons must have accessible names
- `label` — form elements must have labels
- `color-contrast` — text must meet contrast ratios
- `aria-required-attr` — ARIA roles must have required attributes
- `aria-valid-attr-value` — ARIA attributes must have valid values
- `keyboard` — interactive elements must be keyboard accessible
- `focus-order-semantics` — focus order must be logical
- `region` — content must be in landmark regions
## Notes
- When in doubt about severity, err on the side of higher severity.
- Always provide the concrete fix — don't just say "add alt text", show the actual code change.
- If a component is used in multiple places, note the multiplied impact.
- Flag any patterns that suggest systemic issues (e.g., "none of the form inputs have labels" suggests a pattern problem, not just individual findings).