Skip to main content

Overview

Accessibility is at the core of Radix UI Primitives. Every component is built to adhere to WAI-ARIA Authoring Practices and is thoroughly tested with assistive technologies.
While Radix handles most accessibility concerns, you’re still responsible for providing accessible content, labels, and color contrast in your designs.

Core Accessibility Features

WAI-ARIA Compliance

All components implement ARIA design patterns with proper roles, states, and properties.

Keyboard Navigation

Full keyboard support with intuitive shortcuts and focus management.

Screen Reader Support

Tested with NVDA, JAWS, and VoiceOver for optimal screen reader experience.

Focus Management

Automatic focus trapping, restoration, and visible focus indicators.

WAI-ARIA Implementation

Radix components automatically apply appropriate ARIA attributes:

Roles

Components use semantic HTML and ARIA roles:

States and Properties

ARIA states are managed automatically:

Relationships

Component relationships are established via ARIA:

Keyboard Navigation

All interactive components support keyboard navigation:

Common Keyboard Patterns

  • Escape - Closes the dialog
  • Tab - Moves focus to next focusable element within dialog
  • Shift + Tab - Moves focus to previous focusable element
  • Focus is trapped within the dialog while open
  • Focus returns to trigger element when closed
  • Arrow Left - Focuses previous tab
  • Arrow Right - Focuses next tab
  • Home - Focuses first tab
  • End - Focuses last tab
  • Tab - Moves focus into the tab panel
  • Space / Enter - Toggles the accordion item
  • Arrow Down - Focuses next accordion trigger
  • Arrow Up - Focuses previous accordion trigger
  • Home - Focuses first accordion trigger
  • End - Focuses last accordion trigger
  • Arrow Up / Right - Increases value by step
  • Arrow Down / Left - Decreases value by step
  • Home - Sets value to minimum
  • End - Sets value to maximum
  • Page Up - Increases value by larger step
  • Page Down - Decreases value by larger step
  • Arrow Down / Right - Focuses and selects next radio
  • Arrow Up / Left - Focuses and selects previous radio
  • Space - Selects focused radio if not already selected

Focus Management

Radix handles complex focus scenarios:

Screen Reader Support

Radix components are tested with major screen readers:
  • NVDA (Windows)
  • JAWS (Windows)
  • VoiceOver (macOS, iOS)
  • TalkBack (Android)

Announcements

Components make appropriate announcements:

Labels and Descriptions

Provide accessible labels and descriptions:
Always include Dialog.Title and Dialog.Description for dialogs. Screen readers rely on these for context.

Visually Hidden Content

Use the VisuallyHidden utility for screen reader-only content:

Form Accessibility

Radix form components integrate with native form behavior:

Labels

Always associate labels with form controls:

Required Fields

Indicate required fields:

Error Messages

Link error messages to form controls:

Focus Indicators

Visible focus indicators are crucial for keyboard users:
Use :focus-visible instead of :focus to show indicators only for keyboard navigation, not mouse clicks.

Color Contrast

While Radix doesn’t provide styles, ensure your designs meet WCAG standards:
  • Text: Minimum 4.5:1 contrast ratio (AA)
  • Large text: Minimum 3:1 contrast ratio (AA)
  • UI components: Minimum 3:1 contrast ratio (AA)
  • Focus indicators: Clearly visible against background
Use tools like WebAIM Contrast Checker to verify your color choices.

Live Regions

For dynamic content updates, use live regions:

Testing for Accessibility

1

Keyboard Testing

Test all interactions using only the keyboard:
  • Tab through all interactive elements
  • Ensure focus indicators are visible
  • Try all keyboard shortcuts
  • Verify focus doesn’t get trapped unexpectedly
2

Screen Reader Testing

Test with at least one screen reader:
  • NVDA (free, Windows)
  • VoiceOver (built-in, macOS/iOS)
  • Verify announcements are clear and complete
  • Check that content is read in logical order
3

Automated Testing

Use automated tools to catch common issues:
4

Manual Inspection

Review the rendered HTML:
  • Check ARIA attributes are correct
  • Verify semantic HTML is used
  • Ensure IDs are unique
  • Check heading hierarchy

Common Accessibility Patterns

Tooltips

Custom Components

When building custom components, preserve accessibility:

Accessibility Checklist

Before shipping, verify:
  • All interactive elements are keyboard accessible
  • Focus indicators are visible and meet contrast requirements
  • All images have alt text (or are marked decorative)
  • All form inputs have associated labels
  • Error messages are linked to their inputs
  • Color is not the only way to convey information
  • Text meets minimum contrast ratios
  • Heading hierarchy is logical (h1, h2, h3…)
  • ARIA attributes are used correctly
  • Content is announced properly to screen readers
  • Focus is managed correctly in dynamic content
  • Tested with keyboard only
  • Tested with at least one screen reader
  • Passed automated accessibility tests

Resources

WAI-ARIA Practices

Official ARIA authoring practices guide

WebAIM

Web accessibility resources and training

A11y Project

Community-driven accessibility guidance

MDN Accessibility

Comprehensive accessibility documentation

Next Steps

Components

Explore accessible components

Form Component

Build accessible forms

Visually Hidden

Screen reader-only content

Label Component

Associate labels with inputs