Accessibility in React Slider

4 Sep 20264 minutes to read

The React Slider component follows the accessibility guidelines and standards, including ADA, Section 508, WCAG 2.2 standards, and WCAG roles that are commonly used to evaluate accessibility.

The accessibility compliance for the React Slider component is outlined below.

Accessibility Criteria Compatibility
WCAG 2.2 Support Yes
Section 508 Support Yes
Screen Reader Support Yes
Right-To-Left Support Yes
Color Contrast Yes
Mobile Device Support Yes
Keyboard Navigation Support Yes
Accessibility Checker Validation Yes
Axe-core Accessibility Validation Yes
Yes - All features of the component meet the requirement.
Intermediate - Some features of the component do not meet the requirement.
No - The component does not meet the requirement.

WAI-ARIA attributes

The React Slider component follows the WAI-ARIA patterns to meet the accessibility. The following ARIA attributes are used in the React Slider component:

Attributes Purpose
role=slider Used to convey a significant and contextual message to the user.
aria-valuemin Indicates the Minimum value of the slider.
aria-valuemax Indicates the Maximum value of the slider.
aria-valuenow Indicates the current value of the slider.
aria-valuetext Returns the current text of the slider.
aria-orientation Indicates whether the React Slider is oriented horizontally or vertically.
aria-label Provides an accessible name for the React Slider, serving as label text for the React Slider’s left and right buttons (for increment and decrement).

Keyboard interaction

The React Slider component follows the keyboard interaction guideline to assist people who use assistive technologies (AT) and keyboard navigation. The following keyboard shortcuts are supported.

Press To do this
Right Arrow/Up Arrow Increase the React Slider value.
Left Arrow/Down Arrow Decrease the React Slider value.
Home Moves to the start value (for React Slider when the second thumb is focused and the Home key is pressed, it moves to the first thumb value).
End Moves to the end value (for React Slider when the first thumb is focused and the End key is pressed, it moves to the second thumb value).
Page Up Increases the React Slider by largeStep value.
Page Down Decreases the React Slider by largeStep value.

Ensuring accessibility

Accessibility compliance is ensured through accessibility-checker and axe-core software tools during automated testing.

The following sample demonstrates the React Slider component’s accessibility compliance. Open the sample in a new window to evaluate accessibility with these tools.

See also