Overview
Svelte Atoms Core components are built with accessibility in mind, providing semantic HTML, ARIA attributes, and keyboard navigation out of the box. All components follow WAI-ARIA authoring practices to ensure your applications are usable by everyone.While components include accessibility features by default, you’re responsible for providing appropriate labels, descriptions, and context for your specific use case.
Semantic HTML
All atoms render semantic HTML elements by default, which can be customized using theas prop.
Default Semantic Elements
ARIA Attributes
Components include ARIA attributes where appropriate. You can extend or override these as needed.Buttons and Interactive Elements
Form Controls
Dialogs and Overlays
Keyboard Navigation
All interactive components support keyboard navigation following WAI-ARIA patterns.Buttons
- Keys
- Example
- Enter: Activate button
- Space: Activate button
- Tab: Focus next element
- Shift+Tab: Focus previous element
Dropdowns and Comboboxes
- Keys
- Example
- Enter/Space: Open/close dropdown
- Arrow Down: Move to next item
- Arrow Up: Move to previous item
- Home: Move to first item
- End: Move to last item
- Escape: Close dropdown
- Type to search: Filter items
Accordion
- Keys
- Example
- Enter/Space: Toggle accordion item
- Tab: Move focus to next focusable element
- Arrow Down: Move to next accordion header
- Arrow Up: Move to previous accordion header
- Home: Focus first accordion header
- End: Focus last accordion header
Tabs
- Keys
- Example
- Arrow Left: Focus previous tab
- Arrow Right: Focus next tab
- Home: Focus first tab
- End: Focus last tab
- Tab: Move focus to active tab panel
Focus Management
Components handle focus management automatically for common patterns.Dialog Focus Trap
Custom Focus Handling
Use lifecycle hooks for custom focus management:Screen Reader Support
Announcements with ARIA Live Regions
Descriptive Labels
Color and Contrast
Ensure sufficient color contrast for text and interactive elements.Motion and Animations
Respect user preferences for reduced motion:Testing Accessibility
Manual Testing Checklist
Screen Reader
Screen Reader
- All content is announced properly
- Form labels are associated correctly
- Error messages are announced
- Dynamic content changes are announced
- Images have appropriate alt text
Visual
Visual
- Text has sufficient contrast
- Focus indicators are visible
- Content is readable when zoomed to 200%
- No information conveyed by color alone
Automated Testing
Use tools like axe-core for automated accessibility testing:Accessibility Best Practices
Use Semantic HTML
Always use the most appropriate HTML element for the content
Provide Labels
Every form control must have an associated label
Keyboard Navigation
Ensure all functionality is accessible via keyboard
Test with Users
Test with real assistive technology users when possible
Next Steps
Animations
Learn about animation lifecycle hooks
Styling
Explore styling approaches for accessible design
Components
Browse all accessible components
WAI-ARIA
Read the official ARIA Authoring Practices Guide