Accessibility Support
Out of the box, the Telerik and Kendo UI Switch provides extensive accessibility support and enables users with disabilities to acquire complete control over its features.
The Switch is compliant with the Web Content Accessibility Guidelines (WCAG) 2.2 standards and Section 508 requirements, follows the Web Accessibility Initiative - Accessible Rich Internet Applications (WAI-ARIA) best practices for implementing the keyboard navigation and provides options for managing its focus and is tested against the most popular screen readers.
Switch
ARIA Attributes
| Attribute | Description |
|---|---|
role="switch" | Announces the switch role of the element. |
aria-label|aria-labelledby | The input requires an accessible name to which it will be assigned. |
aria-required="true" | Rendered only when the Switch is in a form. Required because <span role="switch"> does not support the native required attribute. |
aria-checked | Announces the checked state of the Switch. |
aria-describedby | Points to the hint or error message for the switch. |
aria-invalid="true" | Rendered only when the Switch is in a form and announces the invalid state. |
tabindex="0" | The element must be focusable. Disabled switches are removed from tab order. |
aria-disabled="true" | Rendered only when the Switch is disabled. |
aria-readonly="true" | Rendered only when the Switch is readonly. Readonly switches remain focusable but their value cannot be changed. |
Keyboard Navigation
| Trigger | Behavior |
|---|---|
Space | Toggles the checked state of the Switch. Works analogically to the checkbox. |
UX Behavior
| Feature | Description |
|---|---|
| Toggle | Clicking the switch flips between on and off states. |
| Labels | Optional on/off labels inside the track reflect the current state. |
| Disabled state | When disabled, the switch cannot be toggled. |
Testing
The Switch has been extensively tested automatically with axe-core and manually with the most popular screen readers.
Screen Readers
The Switch has been tested with the following screen readers and browsers combinations:
| Environment | Tool |
|---|---|
| Firefox | NVDA |
| Chrome | JAWS |
| Microsoft Edge | JAWS |