Build your web apps using Smart UI
Smart.SwitchButton - Accessibility
The SwitchButton component provides a built-in compliance with WAI-ARIA specification. This is achieved through attributes like role, aria-checked and others. The role of the SwitchButton component is 'switch'. As such it is a type of checkbox that represents on/off values as opposed to checked/unchecked values.
The purpose of the ARIA attributes is to help disabled people by providing the information specific to the component to assistive technology in the screen readers.
The Switch button is a type of checkbox that has three possible values true, false, indeterminate.
The following ARIA attributes are in use by the component:
- aria-disabled - indicates that the interaction with the Switch button component is disabled.
- aria-hidden - since the switch buttons do not provide any textual content their false and true content should be hidden from the accessibility API.
- aria-checked - indicates whether the Switch button is on or off.
The following keyboard shortcuts are available to interact with the Switch button:
|Space||Switches on/off the button.|
Additional information on WAI-ARIA for the SMART Framework can be found here.