Accessibility in Blazor Toggle Switch Button Component

27 Sep 20211 minute to read

The web accessibility makes web content and web applications more accessible for people with disabilities. It especially helps in dynamic content change and development of advanced user interface controls with AJAX, HTML, JavaScript, and related technologies.

Toggle Switch Button provides built-in compliance with WAI-ARIA specifications. WAI-ARIA support is achieved through the attributes like aria-checked and aria-disabled. It helps the people with disabilities by providing information about the widget for assistive technology in the screen readers.

Properties Functionality
role Indicates the Toggle Switch Button component.
aria-checked Indicates whether the input is checked or unchecked.
aria-disabled Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.

Keyboard interaction

Keyboard shortcuts Actions
Space When the Toggle Switch Button has focus, pressing the Space key changes the state of the Toggle Switch Button.