Accessibility
WCAG AA compliance, axe-core testing, keyboard navigation, and screen reader support in Arcana UI.
Our accessibility commitment
Every Arcana component is designed and tested to meet WCAG 2.1 AA standards. This means:
- Minimum 4.5:1 contrast ratio for body text (3:1 for large text)
- Full keyboard operability for all interactive elements
- Semantic HTML with correct ARIA roles, states, and properties
- Screen reader announcements for dynamic content
- Focus management for modals and overlays
- axe-core automated tests pass on all components (238 tests, all passing)
Testing with axe
All components are tested with jest-axe in the test suite:
Keyboard navigation
| Component | Keys |
|---|---|
| Button | Enter, Space to activate |
| Input, Textarea | Standard text editing |
| Select | Enter/Space to open, Arrow keys to navigate, Enter to select, Escape to close |
| Checkbox | Space to toggle |
| Radio | Arrow keys to navigate group, Space to select |
| Toggle | Space, Enter to toggle |
| Modal | Escape to close, Tab/Shift+Tab trapped inside |
| Tabs | Arrow keys to switch tabs, Enter/Space to activate |
| Accordion | Enter/Space to expand/collapse |
| Dropdown menus | Arrow keys, Enter, Escape |
Focus management
Modal focus trap
The Modal component implements a complete focus trap: when open, Tab and Shift+Tab cycle only through focusable elements inside the dialog. Focus is restored to the triggering element when the modal closes.
Skip links
For page-level accessibility, add a skip link before your Navbar:
ARIA attributes
Required labels
All form components require accessible names:
Error states
Use the error prop on form components to associate error messages:
This adds aria-invalid="true" and aria-describedby pointing to the error message.
Icon-only buttons
Always add aria-label to buttons that contain only icons:
Colour contrast
Arcana's default palette is tested against WCAG AA:
| Token | Foreground | Background | Ratio | Level |
|---|---|---|---|---|
| Primary text | --arcana-text-primary | --arcana-surface-default | 14.3:1 | AAA |
| Secondary text | --arcana-text-secondary | --arcana-surface-default | 6.2:1 | AA |
| Action text on primary | --arcana-text-on-action | --arcana-action-primary | 5.1:1 | AA |
| Placeholder | --arcana-text-placeholder | --arcana-surface-default | 4.6:1 | AA |
When customising colours, use a contrast checker to verify:
Screen reader testing
Components are tested with:
- macOS VoiceOver — Safari and Chrome
- NVDA + Firefox (Windows)
- axe DevTools browser extension
Live regions
Dynamic content (Toast notifications, form errors) uses appropriate ARIA live regions:
Reduced motion
Arcana respects prefers-reduced-motion:
Reporting accessibility issues
If you find an accessibility issue with any Arcana component, please open a GitHub issue with the component name, reproduction steps, and the assistive technology you tested with.