Accessibility Audit
Purpose
Conduct a comprehensive accessibility audit ensuring WCAG 2.1 Level AA compliance and an inclusive user experience. This skill covers semantic HTML, ARIA implementation, keyboard navigation, screen reader compatibility, visual accessibility, form accessibility, mobile accessibility, and content readability to produce an actionable compliance report.
When to Use
- Before production deployment
- After major UI/UX changes
- When adding new components or pages
- As part of regular accessibility reviews (quarterly recommended)
- After receiving accessibility-related user feedback
- When compliance requirements mandate an accessibility audit
Audit Areas
1. WCAG 2.1 Compliance
Validate against the four WCAG principles:
Perceivable:
- Text alternatives for non-text content (images, icons, media)
- Captions and transcripts for audio/video
- Content adaptable to different presentations
- Distinguishable content (contrast, spacing)
Operable:
- All functionality accessible via keyboard
- Users have enough time to read and interact
- No content that causes seizures or physical reactions
- Navigable structure with clear wayfinding
Understandable:
- Readable text content
- Predictable operation and behavior
- Input assistance for error prevention and recovery
Robust:
- Compatible with current and future assistive technologies
- Valid markup and correct ARIA usage
2. Semantic HTML and ARIA
Checks:
- Proper HTML5 semantic elements (
<nav>, <main>, <article>, <section>, <aside>, <header>, <footer>)
- ARIA roles used only when semantic HTML is insufficient
- ARIA properties (aria-label, aria-labelledby, aria-describedby)
- ARIA states (aria-expanded, aria-selected, aria-hidden)
- Landmark regions cover all page content
- Heading hierarchy (h1-h6) is logical and complete
- Lists use proper markup (ul, ol, dl)
- Tables use th, caption, and scope attributes
3. Keyboard Navigation
Checks:
- All interactive elements are reachable via Tab/Shift+Tab
- Tab order matches visual reading order
- Focus indicators are visible and high-contrast
- Skip navigation link present
- No keyboard traps (user can always navigate away)
- Modal dialogs trap focus correctly
- Dropdown menus support arrow key navigation
- Custom widgets follow WAI-ARIA Authoring Practices
Test procedure:
- Disconnect the mouse
- Navigate the entire application using only Tab, Shift+Tab, Enter, Space, and Arrow keys
- Test all interactive elements (links, buttons, forms, menus, modals)
- Verify focus is always visible
- Confirm no keyboard traps exist
4. Screen Reader Compatibility
Checks:
- Content is announced in a logical reading order
- Form labels and instructions are read correctly
- Error messages are announced when they appear
- Dynamic content updates use aria-live regions
- Image alt text is descriptive and meaningful
- Link text is descriptive (not "click here")
- Button labels clearly describe the action
- Table headers are associated with data cells
Screen readers to test:
- NVDA (Windows, free)
- VoiceOver (macOS/iOS, built-in)
- TalkBack (Android, built-in)
- JAWS (Windows, commercial)
5. Visual Accessibility
Color Contrast:
- Normal text: >= 4.5:1 ratio (WCAG AA)
- Large text (>= 18px or >= 14px bold): >= 3:1 ratio
- UI components and graphical objects: >= 3:1 ratio
- Focus indicators: >= 3:1 ratio against adjacent colors
Text and Zoom:
- Minimum base font size: 16px
- Text scalable to 200% without content loss
- Content reflows at 320px width (400% zoom)
- No horizontal scrolling at standard zoom levels
Visual Indicators:
- Color is never the sole indicator of information
- Focus indicators are always visible
- Reduced motion supported (prefers-reduced-motion)
- Images of text avoided (except logos)
6. Form and Input Accessibility
Checks:
- All inputs have associated labels (for/id or aria-labelledby)
- Required fields are indicated (not by color alone)
- Error messages are clear and associated (aria-describedby)
- Autocomplete attributes for personal data fields
- Grouped inputs use fieldset/legend
- Input types are appropriate (email, tel, number, url)
- Help text is programmatically associated
- Success messages are announced to screen readers
7. Mobile Accessibility
Checks:
- Touch targets >= 44x44px (WCAG 2.1)
- Spacing between targets >= 8px
- Pinch-to-zoom is not disabled
- Both portrait and landscape orientations supported
- Mobile screen reader compatibility (VoiceOver, TalkBack)
- Viewport meta tag does not disable scaling
8. Content Accessibility
Checks:
- Language attribute set on HTML element (
<html lang="en">)
- Content language changes marked (lang attribute on elements)
- Reading level appropriate for the audience
- Abbreviations expanded on first use
- Instructions do not rely on sensory characteristics ("the red button")
- Time-limited content can be paused or extended
- Auto-playing media can be paused or stopped
Workflow
Phase 1: Automated Testing
# Lighthouse accessibility audit
lighthouse https://your-app.com --only-categories=accessibility --view
# Pa11y CI for multiple pages
pa11y-ci --sitemap https://your-app.com/sitemap.xml
# axe-core in test suite
npx axe https://your-app.com
Phase 2: Keyboard Testing
- Navigate the entire application using only the keyboard
- Document every element that cannot be reached or operated
- Note any keyboard traps or missing focus indicators
- Verify modal focus management
- Test all custom interactive widgets
Phase 3: Screen Reader Testing
- Test with NVDA or VoiceOver on all critical pages
- Verify form labels, error announcements, and dynamic updates
- Check reading order matches visual order
- Test navigation landmarks and heading structure
Phase 4: Visual Testing
- Check color contrast with browser DevTools or a contrast analyzer
- Zoom to 200% and verify no content loss
- Zoom to 400% and verify content reflows to single column
- Enable reduced motion and verify animations are suppressed
Phase 5: Code Review
- Review HTML for semantic correctness
- Verify ARIA attributes are used correctly
- Check heading hierarchy (one h1, logical h2-h6 structure)
- Review alt text quality on all images
Report Template
# Accessibility Audit Report
**Date:** YYYY-MM-DD
**Application:** [App Name]
**WCAG Target:** Level AA
## Executive Summary
- **WCAG Compliance:** Pass/Fail Level AA
- **Overall Score:** X/100
- **Critical Issues:** X (blocks access)
- **High Issues:** X (severe impact)
- **Medium Issues:** X (moderate impact)
- **Low Issues:** X (best practices)
## WCAG 2.1 Compliance Status
### Principle 1: Perceivable
| Criterion | Level | Status |
|------------------------------|-------|-----------|
| 1.1.1 Non-text Content | A | PASS/FAIL |
| 1.3.1 Info and Relationships | A | PASS/FAIL |
| 1.4.3 Contrast (Minimum) | AA | PASS/FAIL |
| 1.4.11 Non-text Contrast | AA | PASS/FAIL |
### Principle 2: Operable
| Criterion | Level | Status |
|------------------------|-------|-----------|
| 2.1.1 Keyboard | A | PASS/FAIL |
| 2.1.2 No Keyboard Trap | A | PASS/FAIL |
| 2.4.3 Focus Order | A | PASS/FAIL |
| 2.4.7 Focus Visible | AA | PASS/FAIL |
### Principle 3: Understandable
| Criterion | Level | Status |
|------------------------------|-------|-----------|
| 3.1.1 Language of Page | A | PASS/FAIL |
| 3.3.1 Error Identification | A | PASS/FAIL |
| 3.3.2 Labels or Instructions | A | PASS/FAIL |
### Principle 4: Robust
| Criterion | Level | Status |
|-------------------------|-------|-----------|
| 4.1.2 Name, Role, Value | A | PASS/FAIL |
| 4.1.3 Status Messages | AA | PASS/FAIL |
## Findings by Severity
### Critical (Blocks Access)
1. **[Issue Title]**
- **WCAG:** [Criterion]
- **Location:** [Page/Component]
- **User Impact:** [Who is affected and how]
- **Remediation:** [Fix steps]
- **Effort:** [Low/Medium/High]
### High / Medium / Low
[...]
## Testing Results
- **Lighthouse Score:** X/100
- **axe Violations:** X critical, X serious, X moderate, X minor
- **Keyboard Navigation:** PASS/FAIL
- **Screen Reader:** PASS/FAIL
- **Color Contrast:** PASS/FAIL
## Recommendations
1. **Priority 1 (Critical):** [Fix immediately]
2. **Priority 2 (High):** [Fix this sprint]
3. **Priority 3 (Medium):** [Fix next sprint]
4. **Priority 4 (Low):** [Backlog]
WCAG Level Quick Reference
Level A (Minimum):
- Alt text for all images
- All functionality keyboard accessible
- Clear form labels
- No seizure-triggering content
Level AA (Target):
- Color contrast 4.5:1 for text, 3:1 for UI
- Text resizable to 200%
- Multiple navigation methods
- Consistent navigation
- Error suggestions and prevention
Level AAA (Aspirational):
- Color contrast 7:1 for text
- No time limits
- No interruptions
- Enhanced error prevention
Best Practices
- Test early and often -- integrate accessibility checks into development, not just audits
- Use semantic HTML first -- ARIA is supplemental, not a replacement
- Test with real assistive technology -- automated tools catch only ~30% of issues
- Include users with disabilities -- real user feedback is invaluable
- Automate in CI/CD -- fail builds on critical accessibility violations
- Train the team -- accessibility is everyone's responsibility
- Document accessible patterns -- create and maintain an accessible component library
- Track compliance trends -- compare audit results over time
- Focus on user impact -- prioritize fixes that affect the most users
- Consider all disabilities -- visual, auditory, motor, cognitive
Recommended Tools
Browser Extensions:
- axe DevTools -- automated testing
- WAVE -- visual accessibility feedback
- Lighthouse -- audit scores and recommendations
- Color Contrast Analyzer -- contrast checking
Screen Readers:
- NVDA (Windows, free)
- VoiceOver (macOS/iOS, built-in)
- TalkBack (Android, built-in)
Command Line:
- Pa11y CI -- automated testing in CI/CD
- axe-core -- headless accessibility testing
- Lighthouse CI -- continuous integration audits
1---2name: accessibility-audit3description: WCAG 2.1 AA accessibility audit patterns. Use when conducting accessibility reviews, ensuring inclusive UX, or auditing ARIA and keyboard navigation compliance.4---56# Accessibility Audit78## Purpose910Conduct a comprehensive accessibility audit ensuring WCAG 2.1 Level AA compliance and an inclusive user experience. This skill covers semantic HTML, ARIA implementation, keyboard navigation, screen reader compatibility, visual accessibility, form accessibility, mobile accessibility, and content readability to produce an actionable compliance report.1112## When to Use1314- Before production deployment15- After major UI/UX changes16- When adding new components or pages17- As part of regular accessibility reviews (quarterly recommended)18- After receiving accessibility-related user feedback19- When compliance requirements mandate an accessibility audit2021## Audit Areas2223### 1. WCAG 2.1 Compliance2425Validate against the four WCAG principles:2627**Perceivable:**2829- Text alternatives for non-text content (images, icons, media)30- Captions and transcripts for audio/video31- Content adaptable to different presentations32- Distinguishable content (contrast, spacing)3334**Operable:**3536- All functionality accessible via keyboard37- Users have enough time to read and interact38- No content that causes seizures or physical reactions39- Navigable structure with clear wayfinding4041**Understandable:**4243- Readable text content44- Predictable operation and behavior45- Input assistance for error prevention and recovery4647**Robust:**4849- Compatible with current and future assistive technologies50- Valid markup and correct ARIA usage5152### 2. Semantic HTML and ARIA5354**Checks:**5556- Proper HTML5 semantic elements (`<nav>`, `<main>`, `<article>`, `<section>`, `<aside>`, `<header>`, `<footer>`)57- ARIA roles used only when semantic HTML is insufficient58- ARIA properties (aria-label, aria-labelledby, aria-describedby)59- ARIA states (aria-expanded, aria-selected, aria-hidden)60- Landmark regions cover all page content61- Heading hierarchy (h1-h6) is logical and complete62- Lists use proper markup (ul, ol, dl)63- Tables use th, caption, and scope attributes6465### 3. Keyboard Navigation6667**Checks:**6869- All interactive elements are reachable via Tab/Shift+Tab70- Tab order matches visual reading order71- Focus indicators are visible and high-contrast72- Skip navigation link present73- No keyboard traps (user can always navigate away)74- Modal dialogs trap focus correctly75- Dropdown menus support arrow key navigation76- Custom widgets follow WAI-ARIA Authoring Practices7778**Test procedure:**79801. Disconnect the mouse812. Navigate the entire application using only Tab, Shift+Tab, Enter, Space, and Arrow keys823. Test all interactive elements (links, buttons, forms, menus, modals)834. Verify focus is always visible845. Confirm no keyboard traps exist8586### 4. Screen Reader Compatibility8788**Checks:**8990- Content is announced in a logical reading order91- Form labels and instructions are read correctly92- Error messages are announced when they appear93- Dynamic content updates use aria-live regions94- Image alt text is descriptive and meaningful95- Link text is descriptive (not "click here")96- Button labels clearly describe the action97- Table headers are associated with data cells9899**Screen readers to test:**100101- NVDA (Windows, free)102- VoiceOver (macOS/iOS, built-in)103- TalkBack (Android, built-in)104- JAWS (Windows, commercial)105106### 5. Visual Accessibility107108**Color Contrast:**109110- Normal text: >= 4.5:1 ratio (WCAG AA)111- Large text (>= 18px or >= 14px bold): >= 3:1 ratio112- UI components and graphical objects: >= 3:1 ratio113- Focus indicators: >= 3:1 ratio against adjacent colors114115**Text and Zoom:**116117- Minimum base font size: 16px118- Text scalable to 200% without content loss119- Content reflows at 320px width (400% zoom)120- No horizontal scrolling at standard zoom levels121122**Visual Indicators:**123124- Color is never the sole indicator of information125- Focus indicators are always visible126- Reduced motion supported (prefers-reduced-motion)127- Images of text avoided (except logos)128129### 6. Form and Input Accessibility130131**Checks:**132133- All inputs have associated labels (for/id or aria-labelledby)134- Required fields are indicated (not by color alone)135- Error messages are clear and associated (aria-describedby)136- Autocomplete attributes for personal data fields137- Grouped inputs use fieldset/legend138- Input types are appropriate (email, tel, number, url)139- Help text is programmatically associated140- Success messages are announced to screen readers141142### 7. Mobile Accessibility143144**Checks:**145146- Touch targets >= 44x44px (WCAG 2.1)147- Spacing between targets >= 8px148- Pinch-to-zoom is not disabled149- Both portrait and landscape orientations supported150- Mobile screen reader compatibility (VoiceOver, TalkBack)151- Viewport meta tag does not disable scaling152153### 8. Content Accessibility154155**Checks:**156157- Language attribute set on HTML element (`<html lang="en">`)158- Content language changes marked (lang attribute on elements)159- Reading level appropriate for the audience160- Abbreviations expanded on first use161- Instructions do not rely on sensory characteristics ("the red button")162- Time-limited content can be paused or extended163- Auto-playing media can be paused or stopped164165## Workflow166167### Phase 1: Automated Testing168169```bash170# Lighthouse accessibility audit171lighthouse https://your-app.com --only-categories=accessibility --view172173# Pa11y CI for multiple pages174pa11y-ci --sitemap https://your-app.com/sitemap.xml175176# axe-core in test suite177npx axe https://your-app.com178```179180### Phase 2: Keyboard Testing1811821. Navigate the entire application using only the keyboard1832. Document every element that cannot be reached or operated1843. Note any keyboard traps or missing focus indicators1854. Verify modal focus management1865. Test all custom interactive widgets187188### Phase 3: Screen Reader Testing1891901. Test with NVDA or VoiceOver on all critical pages1912. Verify form labels, error announcements, and dynamic updates1923. Check reading order matches visual order1934. Test navigation landmarks and heading structure194195### Phase 4: Visual Testing1961971. Check color contrast with browser DevTools or a contrast analyzer1982. Zoom to 200% and verify no content loss1993. Zoom to 400% and verify content reflows to single column2004. Enable reduced motion and verify animations are suppressed201202### Phase 5: Code Review2032041. Review HTML for semantic correctness2052. Verify ARIA attributes are used correctly2063. Check heading hierarchy (one h1, logical h2-h6 structure)2074. Review alt text quality on all images208209## Report Template210211```markdown212# Accessibility Audit Report213214**Date:** YYYY-MM-DD215**Application:** [App Name]216**WCAG Target:** Level AA217218## Executive Summary219- **WCAG Compliance:** Pass/Fail Level AA220- **Overall Score:** X/100221- **Critical Issues:** X (blocks access)222- **High Issues:** X (severe impact)223- **Medium Issues:** X (moderate impact)224- **Low Issues:** X (best practices)225226## WCAG 2.1 Compliance Status227228### Principle 1: Perceivable229| Criterion | Level | Status |230|------------------------------|-------|-----------|231| 1.1.1 Non-text Content | A | PASS/FAIL |232| 1.3.1 Info and Relationships | A | PASS/FAIL |233| 1.4.3 Contrast (Minimum) | AA | PASS/FAIL |234| 1.4.11 Non-text Contrast | AA | PASS/FAIL |235236### Principle 2: Operable237| Criterion | Level | Status |238|------------------------|-------|-----------|239| 2.1.1 Keyboard | A | PASS/FAIL |240| 2.1.2 No Keyboard Trap | A | PASS/FAIL |241| 2.4.3 Focus Order | A | PASS/FAIL |242| 2.4.7 Focus Visible | AA | PASS/FAIL |243244### Principle 3: Understandable245| Criterion | Level | Status |246|------------------------------|-------|-----------|247| 3.1.1 Language of Page | A | PASS/FAIL |248| 3.3.1 Error Identification | A | PASS/FAIL |249| 3.3.2 Labels or Instructions | A | PASS/FAIL |250251### Principle 4: Robust252| Criterion | Level | Status |253|-------------------------|-------|-----------|254| 4.1.2 Name, Role, Value | A | PASS/FAIL |255| 4.1.3 Status Messages | AA | PASS/FAIL |256257## Findings by Severity258259### Critical (Blocks Access)2601. **[Issue Title]**261 - **WCAG:** [Criterion]262 - **Location:** [Page/Component]263 - **User Impact:** [Who is affected and how]264 - **Remediation:** [Fix steps]265 - **Effort:** [Low/Medium/High]266267### High / Medium / Low268[...]269270## Testing Results271- **Lighthouse Score:** X/100272- **axe Violations:** X critical, X serious, X moderate, X minor273- **Keyboard Navigation:** PASS/FAIL274- **Screen Reader:** PASS/FAIL275- **Color Contrast:** PASS/FAIL276277## Recommendations2781. **Priority 1 (Critical):** [Fix immediately]2792. **Priority 2 (High):** [Fix this sprint]2803. **Priority 3 (Medium):** [Fix next sprint]2814. **Priority 4 (Low):** [Backlog]282```283284## WCAG Level Quick Reference285286**Level A (Minimum):**287288- Alt text for all images289- All functionality keyboard accessible290- Clear form labels291- No seizure-triggering content292293**Level AA (Target):**294295- Color contrast 4.5:1 for text, 3:1 for UI296- Text resizable to 200%297- Multiple navigation methods298- Consistent navigation299- Error suggestions and prevention300301**Level AAA (Aspirational):**302303- Color contrast 7:1 for text304- No time limits305- No interruptions306- Enhanced error prevention307308## Best Practices3093101. **Test early and often** -- integrate accessibility checks into development, not just audits3112. **Use semantic HTML first** -- ARIA is supplemental, not a replacement3123. **Test with real assistive technology** -- automated tools catch only ~30% of issues3134. **Include users with disabilities** -- real user feedback is invaluable3145. **Automate in CI/CD** -- fail builds on critical accessibility violations3156. **Train the team** -- accessibility is everyone's responsibility3167. **Document accessible patterns** -- create and maintain an accessible component library3178. **Track compliance trends** -- compare audit results over time3189. **Focus on user impact** -- prioritize fixes that affect the most users31910. **Consider all disabilities** -- visual, auditory, motor, cognitive320321## Recommended Tools322323**Browser Extensions:**324325- axe DevTools -- automated testing326- WAVE -- visual accessibility feedback327- Lighthouse -- audit scores and recommendations328- Color Contrast Analyzer -- contrast checking329330**Screen Readers:**331332- NVDA (Windows, free)333- VoiceOver (macOS/iOS, built-in)334- TalkBack (Android, built-in)335336**Command Line:**337338- Pa11y CI -- automated testing in CI/CD339- axe-core -- headless accessibility testing340- Lighthouse CI -- continuous integration audits