Loading...
Loading...
WCAG 2.1/2.2 compliance, WAI-ARIA implementation, screen reader optimization, keyboard navigation, and accessibility testing expert. Use PROACTIVELY for accessibility violations, ARIA errors, keyboard navigation issues, screen reader compatibility problems, or accessibility testing automation needs.
npx skill4agent add cin12211/orca-q accessibility-expert# Check for accessibility testing tools
npm list @axe-core/playwright @axe-core/react axe-core --depth=0 2>/dev/null | grep -E "(axe-core|@axe-core)" || echo "No axe-core found"
npm list pa11y --depth=0 2>/dev/null | grep pa11y || command -v pa11y 2>/dev/null || echo "No Pa11y found"
npm list lighthouse --depth=0 2>/dev/null | grep lighthouse || command -v lighthouse 2>/dev/null || echo "No Lighthouse found"
# Check for accessibility linting
npm list eslint-plugin-jsx-a11y --depth=0 2>/dev/null | grep jsx-a11y || grep -q "jsx-a11y" .eslintrc* 2>/dev/null || echo "No JSX a11y linting found"
# Check screen reader testing environment
if [[ "$OSTYPE" == "darwin"* ]]; then
defaults read com.apple.speech.voice.prefs SelectedVoiceName 2>/dev/null && echo "VoiceOver available" || echo "VoiceOver not configured"
elif [[ "$OSTYPE" == "msys" || "$OSTYPE" == "cygwin" ]]; then
reg query "HKEY_LOCAL_MACHINE\SOFTWARE\NV Access\NVDA" 2>/dev/null && echo "NVDA detected" || echo "NVDA not found"
reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Freedom Scientific\JAWS" 2>/dev/null && echo "JAWS detected" || echo "JAWS not found"
else
command -v orca 2>/dev/null && echo "Orca available" || echo "Orca not found"
fi
# Framework-specific accessibility libraries
npm list @reach/ui @headlessui/react react-aria --depth=0 2>/dev/null | grep -E "(@reach|@headlessui|react-aria)" || echo "No accessible UI libraries found"
npm list vue-a11y-utils vue-focus-trap --depth=0 2>/dev/null | grep -E "(vue-a11y|vue-focus)" || echo "No Vue accessibility utilities found"
npm list @angular/cdk --depth=0 2>/dev/null | grep "@angular/cdk" || echo "No Angular CDK a11y found"<label>aria-labelaria-labelledbyaria-expandedaria-describedbyaria-labelledbyaria-live<th>prefers-reduced-motionaria-describedbyrequiredaria-required<fieldset><legend># Check for images without alt text
grep -r "<img" --include="*.html" --include="*.jsx" --include="*.tsx" --include="*.vue" src/ | grep -v 'alt=' | head -10
# Find form inputs without labels
grep -r "<input\|<textarea\|<select" --include="*.html" --include="*.jsx" --include="*.tsx" src/ | grep -v 'aria-label\|aria-labelledby' | grep -v '<label' | head -5
# Check heading structure
grep -r "<h[1-6]" --include="*.html" --include="*.jsx" --include="*.tsx" src/ | head -10
# Look for color-only information
grep -r "color:" --include="*.css" --include="*.scss" --include="*.module.css" src/ | grep -E "(red|green|#[0-9a-f]{3,6})" | head -5# Run axe-core if available
if command -v lighthouse &> /dev/null; then
lighthouse http://localhost:3000 --only-categories=accessibility --output=json --quiet
fi
# Run Pa11y if available
if command -v pa11y &> /dev/null; then
pa11y http://localhost:3000 --reporter cli
fi# Find ARIA roles on inappropriate elements
grep -r 'role=' --include="*.html" --include="*.jsx" --include="*.tsx" src/ | grep -E 'role="(button|link)"' | grep -v '<button\|<a' | head -5
# Check for static aria-expanded values
grep -r 'aria-expanded=' --include="*.html" --include="*.jsx" --include="*.tsx" src/ | grep -v 'useState\|state\.' | head -5
# Find broken ARIA references
grep -r 'aria-describedby\|aria-labelledby' --include="*.html" --include="*.jsx" --include="*.tsx" src/ | head -10
# Look for missing live regions
grep -r 'innerHTML\|textContent' --include="*.js" --include="*.jsx" --include="*.tsx" src/ | grep -v 'aria-live\|role=".*"' | head -5# Find interactive elements without keyboard support
grep -r 'onClick\|onPress' --include="*.jsx" --include="*.tsx" --include="*.vue" src/ | grep '<div\|<span' | grep -v 'onKeyDown\|onKeyPress' | head -10
# Check for custom tab index usage
grep -r 'tabindex\|tabIndex' --include="*.html" --include="*.jsx" --include="*.tsx" src/ | head -10
# Look for focus management in modals
grep -r 'focus()' --include="*.js" --include="*.jsx" --include="*.tsx" src/ | head -5
# Find elements that might need focus indicators
grep -r ':focus' --include="*.css" --include="*.scss" --include="*.module.css" src/ | head -10echo "Manual test: Navigate the interface using only the Tab key and arrow keys"
echo "Verify all interactive elements are reachable and have visible focus indicators"# Check heading hierarchy
grep -r -o '<h[1-6][^>]*>' --include="*.html" --include="*.jsx" --include="*.tsx" src/ | sort | head -20
# Find missing landmarks
grep -r '<nav\|<main\|<aside\|role="navigation\|role="main\|role="complementary"' --include="*.html" --include="*.jsx" --include="*.tsx" src/ | wc -l
# Check table accessibility
grep -r '<table' --include="*.html" --include="*.jsx" --include="*.tsx" src/ | head -5
grep -r '<th\|scope=' --include="*.html" --include="*.jsx" --include="*.tsx" src/ | head -5
# Find vague link text
grep -r '>.*<' --include="*.html" --include="*.jsx" --include="*.tsx" src/ | grep -E 'click here|read more|learn more|here|more' | head -10# Check for fixed font sizes
grep -r 'font-size.*px' --include="*.css" --include="*.scss" --include="*.module.css" src/ | head -10
# Find images of text
grep -r '<img.*\.png\|\.jpg\|\.jpeg' --include="*.html" --include="*.jsx" --include="*.tsx" src/ | head -10
# Look for auto-playing media
grep -r 'autoplay\|autoPlay' --include="*.html" --include="*.jsx" --include="*.tsx" src/
# Check for motion preferences
grep -r 'prefers-reduced-motion' --include="*.css" --include="*.scss" src/ || echo "No reduced motion support found"
# Find fixed positioning that might cause zoom issues
grep -r 'position:.*fixed\|position:.*absolute' --include="*.css" --include="*.scss" src/ | head -5# Test color contrast (if tools available)
if command -v lighthouse &> /dev/null; then
echo "Run Lighthouse accessibility audit for color contrast analysis"
fi
# Manual validation steps
echo "Test at 200% browser zoom - verify no horizontal scroll"
echo "Test at 320px viewport width - verify content reflows"
echo "Disable CSS and verify content order makes sense"# Find forms without proper structure
grep -r '<form\|<input\|<textarea\|<select' --include="*.html" --include="*.jsx" --include="*.tsx" src/ | head -10
# Check for error handling
grep -r 'error\|Error' --include="*.js" --include="*.jsx" --include="*.tsx" src/ | grep -v 'console\|throw' | head -10
# Look for required field indicators
grep -r 'required\|aria-required' --include="*.html" --include="*.jsx" --include="*.tsx" src/ | head -5
# Find fieldsets and legends
grep -r '<fieldset\|<legend' --include="*.html" --include="*.jsx" --include="*.tsx" src/ || echo "No fieldsets found"# Set up Pa11y for fast CI feedback
npm install --save-dev pa11y pa11y-ci
# Configure axe-core for comprehensive testing
npm install --save-dev @axe-core/playwright axe-core
# Example CI integration
echo "# Add to package.json scripts:"
echo "\"test:a11y\": \"pa11y-ci --sitemap http://localhost:3000/sitemap.xml\""
echo "\"test:a11y-full\": \"playwright test tests/accessibility.spec.js\""# Install screen readers
echo "Windows: Download NVDA from https://www.nvaccess.org/download/"
echo "macOS: Enable VoiceOver with Cmd+F5"
echo "Linux: Install Orca with package manager"
# Testing checklist
echo "1. Navigate with Tab key only"
echo "2. Test with screen reader enabled"
echo "3. Verify at 200% zoom"
echo "4. Check in high contrast mode"
echo "5. Test form submission and error handling"<div onClick><button><a href="#main" class="skip-link">Skip to main content</a>aria-labelbutton:focus { outline: 2px solid blue; }<div aria-live="polite" id="status"></div>