Accessibility
Slate is built with accessibility in mind.
WCAG 2.1 AA Compliance
All Slate components aim for WCAG 2.1 AA compliance:
- ✅ Proper ARIA attributes
- ✅ Keyboard navigation
- ✅ Screen reader support
- ✅ Color contrast ratios
ARIA Attributes
Components include appropriate ARIA attributes:
aria-labelfor icon-only buttonsaria-expandedfor collapsible componentsaria-describedbyfor form inputsroleattributes where needed
Keyboard Navigation
All interactive components support keyboard navigation:
- Tab to focus
- Enter/Space to activate
- Escape to close modals (topmost overlay only when nested)
- Arrow keys for navigation
Overlays
dialog, sheet, drawer, and alert-dialog share:
- Focus move into the panel on open, restore to the trigger on close
- Tab cycle inside the panel
- Escape closes only the topmost open overlay
html.slate-scroll-lockwhile any overlay is open (nesting-safe count)prefers-reduced-motionshort-circuits overlay transitions
Reduced motion & RTL
- Prefer logical props (
start/end) on sheets, drawers, and toaster placement - Overlay slide directions flip under
[dir="rtl"] - Buttons, accordion, sidebar, app-shell, and overlays respect
prefers-reduced-motion/motion-reduce
Screen Readers
Components are designed to work with screen readers:
- Semantic HTML
- Proper heading hierarchy
- Descriptive labels
- Status announcements
Color Contrast
All color combinations meet WCAG AA standards:
- Text on backgrounds
- Interactive elements
- Focus indicators
- Error states
Best Practices
- Use semantic HTML - Slate components use proper elements
- Add labels - Always label form inputs
- Test with screen readers - Verify accessibility
- Keyboard only - Test without a mouse