# Accessibility (https://react-tourlight.vercel.app/docs/accessibility) Focus management, keyboard behavior, ARIA semantics, reduced motion, and what to verify in your integration. react-tourlight includes focus management, keyboard navigation, ARIA semantics, and reduced-motion behavior. These are building blocks for an accessible guide, not a certification of your application. Test your content, theme contrast, custom tooltips, and interactive targets with the input methods and assistive technologies your users rely on. ## Focus management When the tooltip is displayed, focus moves to its primary action. Non-interactive steps keep focus within the tooltip; interactive steps also need access to the highlighted target. On dismissal, focus should return to the control that launched the guide. Include this behavior in your browser checks, especially when routes or dialogs replace that control. ### Focus trap On non-interactive steps, **Tab** cycles through the tooltip's controls. On interactive steps, the highlighted target remains available to keyboard users. Verify that custom tooltips and application dialogs preserve a usable focus order. ## Keyboard navigation All tours and highlights support full keyboard navigation: | Key | Action | |-----|--------| | **Escape** | Dismiss the tour or highlight | | **Right Arrow** | Go to the next step | | **Left Arrow** | Go to the previous step | | **Tab** | Navigate available controls; non-interactive steps trap focus in the tooltip | | **Shift + Tab** | Reverse cycle through tooltip buttons | | **Enter / Space** | Activate the focused button | Escape can be disabled per-provider with `escToDismiss={false}`, though this is not recommended for accessibility. ## ARIA attributes The tooltip is rendered as a dialog with proper ARIA semantics: - **`role="dialog"`** -- Identifies the tooltip as a dialog to assistive technology - **`aria-labelledby`** -- Points to the step title element, giving the dialog an accessible name - **`aria-describedby`** -- Points to the step content element, giving the dialog an accessible description - **`aria-live="polite"`** -- Announces step changes to screen readers without interrupting the current announcement queue ### Example rendered markup ```html
Find anything instantly with our search.