Accessibility in React ListBox
24 Sep 20264 minutes to read
The React ListBox component adheres to established accessibility guidelines and standards, including ADA, Section 508, WCAG 2.2 standards, and WCAG roles.
The accessibility compliance for the React ListBox component is outlined below.
| Accessibility Criteria | Compatibility |
|---|---|
| WCAG 2.2 Support | ![]() |
| Section 508 Support | ![]() |
| Screen Reader Support | ![]() |
| Right-To-Left Support | ![]() |
| Color Contrast | ![]() |
| Mobile Device Support | ![]() |
| Keyboard Navigation Support | ![]() |
| Accessibility Checker Validation | ![]() |
| Axe-core Accessibility Validation | ![]() |
- All features of the component meet the requirement.
- Some features of the component do not meet the requirement.
- The component does not meet the requirement.WAI-ARIA attributes
The React ListBox component implements WAI-ARIA patterns to ensure accessibility compliance. The following ARIA attributes are used in the React ListBox component:
| Attributes | Purpose |
|---|---|
role |
Indicates the React ListBox component wrapper element as listbox, the UL element as presentation, and its list item as option. |
aria-label |
Provides an accessible name for the React ListBox component. |
aria-multiselectable |
Applied to the element with the React ListBox role, tells assistive technologies that the list supports multiple selection. The default value is true. |
aria-selected |
Applied to elements with role option that are visually styled as selected to inform assistive technologies that the options are selected. |
Keyboard interaction
The React ListBox component follows keyboard interaction guidelines, enabling seamless navigation for users with assistive technologies and keyboard-only users. The following keyboard shortcuts are supported:
| Press | To do this |
|---|---|
| Up arrow | Moves focus to and selects the previous item. |
| Down arrow | Moves focus to and selects the next item. |
| Home | Moves focus to first option. |
| End | Moves focus to last option. |
| Space | Changes the selection state of the focused option. |
| Ctrl + A | Selects all options in the list. |
| Ctrl + Shift + Home | Selects the focused option and all options up to the first option. |
| Ctrl + Shift + End | Selects the focused option and all options down to the last option. |
| Ctrl + Up | Moves focus to the previous item. |
| Ctrl + Down | Moves focus to the next item. |
Ensuring accessibility
The React ListBox component’s accessibility levels are ensured through an accessibility-checker and axe-core software tools during automated testing.
The accessibility compliance of the React ListBox component is shown in the following sample. Open the sample in a new window to evaluate the accessibility of the React ListBox component with accessibility tools.