# ListBox Accessibility

Out of the box, the Telerik UI for ASP.NET Core ListBox provides extensive accessibility support and enables users with disabilities to acquire complete control over its features.

The ListBox is compliant with the [Web Content Accessibility Guidelines (WCAG) 2.2 AA](https://www.w3.org/TR/WCAG22/) standards and [Section 508](https://www.section508.gov/) requirements, follows the [Web Accessibility Initiative - Accessible Rich Internet Applications (WAI-ARIA)](https://www.w3.org/WAI/ARIA/apg/) best practices for implementing the [keyboard navigation](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/editors/listbox/accessibility/overview#keyboard-navigation) for its `component` role, provides options for managing its focus and is tested against the most popular screen readers.

## WAI-ARIA

This section lists the selectors, attributes, and behavior patterns supported by the component and its composite elements, if any.

### ListBox List

| Selector       | Attribute                         | Usage                                                                                                                       |
| -------------- | --------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| `.k-list-ul`   | `role=listbox`                    | Specifies the role of the ListBox `ul` element.                                                                             |
|                | `aria-label` or `aria-labelledby` | Adds a label to the `ul` element of the ListBox.                                                                            |
|                | `aria-multiselectable=true`       | Signifies that the ListBox allows multiple selection. Present only when the multiple selection of the component is enabled. |
| `.k-list-item` | `role=option`                     | Specifies the role of the ListBox `item` element.                                                                           |
|                | `aria-selected=true/false`        | Set to `true` if the item is selected.                                                                                      |
|                | `tabindex=0`                      | The focused listbox item should have tabindex 0, while all others -1.                                                       |

### ListBox Toolbar

The ListBox toolbar follows the specification of the ToolBar component.

[ToolBar accessibility specification](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/navigation/toolbar/accessibility/overview)

| Selector                       | Attribute                     | Usage                                                                                      |
| ------------------------------ | ----------------------------- | ------------------------------------------------------------------------------------------ |
| `.k-listbox-actions`           | `role=toolbar`                | The toolbar is a collection of command buttons.                                            |
|                                | `aria-label`                  | Clarifies the purpose of the toolbar.                                                      |
|                                | `aria-controls=.k-list-ul id` | Points to the ids of the `role=listbox` elements that are being controlled by the ToolBar. |
| `.k-listbox-actions .k-button` | `aria-label` or `title`       | All buttons in the ToolBar must have lables, so that their purpose is clear.               |

## Resources

[WAI-ARIA Authoring Practices: ListBox Pattern](https://www.w3.org/WAI/ARIA/apg/patterns/listbox/)

## Section 508

The ListBox is fully compliant with the [Section 508 requirements](http://www.section508.gov/).

## Testing

The ListBox has been extensively tested automatically with [axe-core](https://github.com/dequelabs/axe-core) and manually with the most popular screen readers.

> To report any accessibility issues, contact the team through the [Telerik Support System](https://www.telerik.com/account/support-center).

### Screen Readers

The ListBox has been tested with the following screen readers and browsers combinations:

| Environment    | Tool |
| -------------- | ---- |
| Firefox        | NVDA |
| Chrome         | JAWS |
| Microsoft Edge | JAWS |

### Test Example

To test the ListBox component, refer to the [ListBox Accessibility Demo](https://demos.telerik.com/aspnet-core/accessibility/listbox).

## Keyboard Navigation

For details on how the ListBox keyboard navigation works, refer to the [ListBox Keyboard Navigation](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/editors/listbox/accessibility/keyboard-navigation) article.

## See Also

* [Keyboard Navigation by the ListBox for ASP.NET Core (Demo)](https://demos.telerik.com/aspnet-core/listbox/keyboard-navigation)
* [Keyboard Navigation by the ListBox for ASP.NET Core](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/editors/listbox/accessibility/keyboard-navigation)
* [Accessibility in Telerik UI for ASP.NET Core](https://www.telerik.com/aspnet-core-ui/documentation/accessibility/overview)
