| name | accessibility-basics |
| description | WCAG basics, keyboard navigation, screen reader |
| triggers | {"extensions":[".tsx",".html"],"directories":["components/"],"keywords":["aria","a11y","accessibility","wcag","screen reader"]} |
| auto_load_when | Editing HTML/JSX with accessibility concerns |
| agent | seo-agent |
| tools | ["Read","Write","Bash"] |
Accessibility Basics Patterns
Focus: WCAG fundamentals, keyboard, screen reader support
1. WCAG Decision Tree
When to meet WCAG level:
โโโ New project โ AA target
โโโ Legal requirement โ A + AA minimum
โโโ Enterprise โ AAA considered
โโโ No requirement โ A minimum
Perceivable principles:
โโโ Text alternatives โ alt text
โโโ Time-based media โ captions/transcript
โโโ Adaptable โ proper structure
โโโ Distinguishable โ contrast + size
Operable principles:
โโโ Keyboard accessible โ yes
โโโ Enough time โ timeouts extension
โโโ No seizures โ 3 flashes max
โโโ Navigationๆๅธฎๅฉ โ clear + consistent
Understandable principles:
โโโ Readable โ language declared
โโโ Predictable โ consistent navigation
โโโ Input assistance โ labels + errors
Robust principles:
โโโ Compatible โ standards
โโโ Status messages โ aria-live
2. Keyboard Navigation Decision Tree
When element needs focus:
โโโ Interactive โ yes
โโโ Custom widget โ yes
โโโ Tabular content โ yes
โโโ Off-screen content โ hidden until used
When to use tab order:
โโโ Logical reading order โ yes
โโโ Visual order matches โ yes
โโโ Explicit tabindex โ avoid
โโโ Reverse tab โ issue
When to manage focus:
โโโ Modal opens โ trap focus
โโโ Modal closes โ restore
โโโ Tab closes โ move to trigger
โโโ Dynamic content โ announce
3. Screen Reader Decision Tree
When to add alt text:
โโโ Informative image โ describe
โโโ Decorative โ empty alt
โโโ Complex image โ description + longdesc
โโโ Link image โ describe destination
When to use roles:
โโโ Native element available โ use native
โโโ Custom widget โ add role
โโโ Enhanced semantics โ add role
โโโ No change โ no role
When to announce changes:
โโโ Dynamic content โ aria-live
โโโ Form errors โ assertive
โโโ Loading states โ polite
โโโ Success โ polite or silent
4. Color Contrast Decision Tree
When to check contrast:
โโโ Text โ minimum 4.5:1 (AA), 7:1 (AAA)
โโโ Large text โ 3:1 (AA), 4.5:1 (AAA)
โโโ UI components โ 3:1
โโโ Logo/text art โ exempt
When to rely on color:
โโโ Error state โ add icon/text
โโโ Selected state โ add indicator
โโโ Links โ underline or color
โโโ Status โ not color alone
When to test:
โโโ All text โ check
โโโ Dark mode โ check
โโโ High contrast โ check
โโโ Zoom 200% โ check
5. Forms Accessibility Decision Tree
When to label fields:
โโโ All inputs โ always
โโโ Screen reader โ yes
โโโ Click target โ yes
โโโ Visible label โ yes
When to group:
โโโ Radio/checkbox group โ fieldset + legend
โโโ Address fields โ fieldset
โโโ Date fields โ fieldset
โโโ Single field โ no grouping
When to announce errors:
โโโ Inline โ aria-invalid + describedby
โโโ Summary โ focus first error
โโโ Field-level โ announce on focus
โโโ Announce on submit โ aria-live
6. Testing Decision Tree
When to test manually:
โโโ Keyboard only โ test
โโโ Screen reader โ test (NVDA/VoiceOver)
โโโ Zoom 200% โ test
โโโ High contrast โ test
Automated vs manual:
โโโ Automated โ catches 30-40%
โโโ Manual โ needed for rest
โโโ User testing โ best for complex
โโโ A11y audit โ automated first
Tools decision:
โโโ axe โ development
โโโ WAVE โ quick check
โโโ Lighthouse โ screening
โโโ NVDA/VoiceOver โ manual
When to Use Decision Summary
- WCAG AA minimum: 4.5:1 contrast, keyboard, alt text
- Native elements: prefer over custom with ARIA
- Focus management: modal traps, restores on close
- Live regions: announce dynamic changes
- Test with keyboard + screen reader + zoom
Anti-Patterns
โ Interactive elements without keyboard navigation
โ
All actions reachable via Tab/Enter/Space/Arrow keys
โ Color contrast below 4.5:1 (AA standard)
โ
Use contrast checker; text on bg โฅ 4.5:1 normal, 3:1 large
โ Images with no alt text
โ
Meaningful images: alt="description"; decorative: alt=""
โ Custom components without ARIA roles
โ
Use semantic HTML first; ARIA only when native element unavailable
โ Focus trapping outside modals
โ
Trap focus inside open modal; restore on close
Quick Reference
| WCAG Level | Requirement | Check |
|---|
| A | Alt text on images | axe DevTools |
| A | Keyboard navigation | Tab through page |
| AA | Color contrast 4.5:1 | Colour Contrast Analyser |
| AA | Focus visible | Outline never display:none |
| AA | Error identification | Describe error in text |
| AAA | Enhanced contrast 7:1 | For critical text |
๐ Universal Language Support
- Turkish Native: This skill natively supports Turkish. If the user prompt is in Turkish, all analysis, formatting, and output MUST be entirely in Turkish. You do not need explicit "write in Turkish" instructions.