Analyze code for accessibility compliance and create an a11y improvement plan
Analyzes code for WCAG accessibility compliance violations and creates a comprehensive improvement plan with prioritized fixes.
/plugin marketplace add dgriffith/bad-daves-robot-army/plugin install dgriffith-bad-daves-robot-army@dgriffith/bad-daves-robot-armyUsing @agent-accessibility-specialist prepare an accessibility review report. You must analyze the codebase for WCAG compliance, identify accessibility barriers, and create a comprehensive a11y improvement plan WITHOUT making any changes.
The user invoked: /accessibility-review {optional_scope}
Valid scopes:
git status and git diff)git log and git diff)gh pr view and gh pr diff)If scope is "current changes":
git status to identify changed filesgit diff to see uncommitted changesIf scope is "recent changes":
git log --oneline -10 to see recent commitsgit diff HEAD~5..HEAD or appropriate rangeIf scope starts with "PR":
gh pr view {number} to get PR detailsgh pr diff {number} to get the changesIf scope is a path:
If no scope provided:
Current Accessibility Assessment
Accessibility Violations
Assistive Technology Support
Create a markdown file at /reports/accessibility-review-{timestamp}.md with:
# Accessibility Review Plan
Generated: {timestamp}
Scope: {full_path_or_entire_project}
## Executive Summary
Brief overview of accessibility status and required improvements
## Current Accessibility Status
### WCAG Compliance
- Current level: {A/AA/AAA/None}
- Target level: WCAG 2.1 AA
- Critical violations: X
- Major violations: Y
- Minor violations: Z
### Accessibility Coverage
- [ ] Semantic HTML: X%
- [ ] ARIA labels: X%
- [ ] Keyboard navigation: X%
- [ ] Screen reader support: X%
- [ ] Color contrast: X%
## Accessibility Violations Found
### Critical (Blockers)
- [ ] Missing alt text: X images
- [ ] Inaccessible forms: Y forms
- [ ] Keyboard traps: Z components
- [ ] No skip navigation links
- [ ] Missing focus indicators
### Major Issues
- [ ] Poor color contrast: X instances
- [ ] Missing ARIA labels: Y elements
- [ ] Improper heading hierarchy
- [ ] Inaccessible modals/dialogs
- [ ] Missing live regions
### Minor Issues
- [ ] Redundant alt text
- [ ] Missing lang attributes
- [ ] Decorative images not hidden
- [ ] Inconsistent focus order
## Component Analysis
### Forms
- Input labels: Status
- Error messages: Status
- Required fields indication: Status
- Validation feedback: Status
- Field grouping: Status
### Navigation
- Keyboard accessibility: Status
- Skip links: Status
- Breadcrumbs: Status
- Menu structure: Status
- Focus management: Status
### Media
- Images alt text: Status
- Video captions: Status
- Audio transcripts: Status
- Decorative images: Status
- Complex graphics: Status
### Interactive Elements
- Buttons: Status
- Links: Status
- Modals: Status
- Tooltips: Status
- Accordions: Status
## Implementation Plan
### Phase 1: Critical Fixes (1 week)
1. Add missing alt text
2. Fix keyboard traps
3. Implement skip navigation
4. Add focus indicators
5. Label form inputs
### Phase 2: WCAG AA Compliance (2-3 weeks)
1. Fix color contrast issues
2. Add ARIA labels and roles
3. Implement proper heading hierarchy
4. Make modals accessible
5. Add live regions
### Phase 3: Enhanced Accessibility (1-2 weeks)
1. Improve screen reader experience
2. Add keyboard shortcuts
3. Implement focus management
4. Enhance error messaging
5. Add accessibility preferences
### Phase 4: Testing & Validation (1 week)
1. Automated accessibility testing
2. Screen reader testing
3. Keyboard navigation testing
4. User testing with disabilities
5. Documentation updates
## Technical Requirements
### Testing Tools
- Automated testing: axe-core, WAVE
- Screen readers: NVDA, JAWS, VoiceOver
- Color contrast: Chrome DevTools
- Keyboard testing: Manual
- Browser extensions: axe DevTools
### Implementation Guidelines
- Use semantic HTML first
- ARIA as enhancement only
- Test with real assistive technology
- Follow WCAG 2.1 AA guidelines
- Document accessibility features
## Testing Strategy
### Automated Testing
- Run axe-core in CI/CD
- Regular WAVE scans
- Lighthouse audits
- Pa11y testing
- Custom rule validation
### Manual Testing
- Screen reader testing matrix
- Keyboard navigation checklist
- Color contrast validation
- Focus order verification
- Zoom/magnification testing
### User Testing
- Recruit users with disabilities
- Test with various AT
- Gather feedback on barriers
- Validate solutions
- Iterative improvements
## Assistive Technology Matrix
| Technology | Status | Issues | Priority |
|------------|--------|--------|----------|
| NVDA | Partial| X bugs | High |
| JAWS | Poor | Y bugs | High |
| VoiceOver | Good | Z bugs | Medium |
| Dragon | Unknown| TBD | Low |
## Risk Assessment
### Legal Risks
- ADA compliance gaps
- WCAG violations
- Discrimination exposure
- Litigation potential
### User Impact
- X% users affected
- Critical features blocked
- Poor user experience
- Brand reputation risk
## Recommendations
### Immediate Actions
1. Fix critical blockers
2. Establish a11y testing
3. Train development team
4. Create a11y checklist
5. Document standards
### Long-term Strategy
- Accessibility-first design
- Regular audits
- User feedback loops
- Continuous improvement
- Team training program
### Tools and Resources
- Testing tools: {list}
- Training resources: {list}
- Reference guides: {list}
- Support services: {list}
## Estimated Effort
- Critical fixes: X days
- Full WCAG AA: Y weeks
- Enhanced features: Z weeks
- Total timeline: N weeks
## Success Metrics
- WCAG AA compliance: 100%
- Automated test pass rate: >95%
- Screen reader compatibility: 100%
- Keyboard navigation: 100%
- User satisfaction: >90%
YOU MUST CREATE THE REPORT FILE. This is not optional.
Create the report file using the Write tool at the specified path:
/reports/{command-name}-{scope}-{timestamp}.mdYYYY-MM-DD-HHmmss/reports/architecture-review-entire-project-2025-10-14-143022.mdFill in ALL sections of the report template
Confirm completion by telling the user:
❌ DON'T: Just summarize findings in the chat ❌ DON'T: Say "I'll create a report" without actually doing it ❌ DON'T: Leave sections incomplete or with placeholders ❌ DON'T: Forget to use the Write tool
✅ DO: Always use the Write tool to create the markdown file ✅ DO: Fill in every section with real findings ✅ DO: Provide the full path to the user when done ✅ DO: Include actionable recommendations
Before responding to the user, verify:
Remember: The report is the primary deliverable. The chat summary is secondary.