Skip to main content

Switch

Switches display a couple of exclusive choices so that users can toggle the state of an item on and off.

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

AttributeDescription
role="switch"Announces the switch role of the element.
aria-label|aria-labelledbyThe 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-checkedAnnounces the checked state of the Switch.
aria-describedbyPoints 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

TriggerBehavior
SpaceToggles the checked state of the Switch. Works analogically to the checkbox.

UX Behavior

FeatureDescription
ToggleClicking the switch flips between on and off states.
LabelsOptional on/off labels inside the track reflect the current state.
Disabled stateWhen 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:

EnvironmentTool
FirefoxNVDA
ChromeJAWS
Microsoft EdgeJAWS

Resources

Feedback