--- name: accessibility-auditor description: | Web accessibility expertise covering WCAG 2.2 conformance, audit methodology, ARIA patterns, keyboard navigation, screen reader testing, focus management, form accessibility, and automated vs manual testing strategies. Use when the user asks about accessibility auditor, accessibility auditor best practices, or needs guidance on accessibility auditor implementation. Do NOT use when the user needs a different specialized skill or is asking about an unrelated technology domain. license: Apache-2.0 metadata: author: foundry-skills version: "1.0.0" tags: "web-development frontend accessibility" category: "web-development" subcategory: "accessibility-performance" depends: "" disclaimer: "none" difficulty: "intermediate" --- # Accessibility Auditor ## Purpose Guide comprehensive accessibility implementation and auditing for web applications. This skill covers WCAG 2.2 conformance at all levels, practical ARIA patterns, testing methodology, and building accessibility into the development lifecycle. ## WCAG 2.2 Conformance Levels ``` Level A (Minimum): - All non-text content has text alternatives - Captions for prerecorded audio - Content is meaningful without color alone - Keyboard accessible (no keyboard traps) - No content that flashes more than 3 times/second - Pages have descriptive titles - Focus order is logical - Link purpose is determinable Level AA (Standard -- target for most projects): - Everything in A, plus: - Captions for live audio - Color contrast 4.5:1 (text), 3:1 (large text) - Text resizable to 200% without loss - Images of text avoided (use real text) - Multiple ways to find pages (nav, search, sitemap) - Headings and labels are descriptive - Focus visible - Consistent navigation and identification - Error suggestion and prevention on forms Level AAA (Enhanced): - Everything in AA, plus: - Sign language for prerecorded audio - Color contrast 7:1 (text), 4.5:1 (large text) - No timing limits - No interruptions (user controls all) - Re-authentication without data loss ``` ## Audit Methodology ### Phase 1: Automated Testing (30% of issues) ``` Tools to run: 1. axe-core (via browser extension or CI) 2. Lighthouse accessibility audit 3. WAVE browser extension 4. ESLint with eslint-plugin-jsx-a11y Automated tests catch: - Missing alt text - Missing form labels - Color contrast violations - Missing document language - Duplicate IDs - Missing landmark regions - Invalid ARIA attributes ``` ### Phase 2: Keyboard Testing (20% of issues) ``` Keyboard testing checklist: [ ] Tab through entire page -- can you reach all interactive elements? [ ] Shift+Tab -- does reverse order make sense? [ ] Enter/Space -- do buttons and links activate? [ ] Arrow keys -- do composite widgets (tabs, menus, listboxes) work? [ ] Escape -- do modals and dropdowns close? [ ] Focus is never trapped (except modals -- which should trap) [ ] Focus indicator is always visible [ ] Skip link present and functional [ ] Focus order matches visual order [ ] No unexpected focus changes ``` ### Phase 3: Screen Reader Testing (30% of issues) ``` Test with at minimum: - NVDA + Firefox (Windows) - VoiceOver + Safari (macOS/iOS) - TalkBack + Chrome (Android) Screen reader testing checklist: [ ] Page title announced on load [ ] Headings create logical outline (h1 -> h2 -> h3) [ ] Landmarks navigable (main, nav, aside, footer) [ ] Images have meaningful alt text (or empty alt for decorative) [ ] Form fields announce labels, required state, errors [ ] Dynamic content changes announced (live regions) [ ] Tables have headers and captions [ ] Links and buttons announce their purpose [ ] Custom components announce role, name, state [ ] Modal focus management works correctly ``` ### Phase 4: Manual Inspection (20% of issues) ``` Manual checks: [ ] Content is understandable at 200% zoom [ ] Content reflows at 320px width (no horizontal scroll) [ ] Motion/animation respects prefers-reduced-motion [ ] Touch targets are at least 24x24px (WCAG 2.2) [ ] Error messages are clear and suggest fixes [ ] Timeout warnings given with option to extend [ ] Content makes sense with CSS disabled [ ] Reading order matches visual order ``` ## ARIA Patterns ### ARIA First Rule: Don't Use ARIA ``` Priority order: 1. Use native HTML elements (button, input, select, dialog, details) 2. If native element exists but needs styling, style the native element 3. Only use ARIA when no native element provides the semantics Native HTML equivalents: