Build your web apps using Smart UI
Smart.SwitchButton - Accessibility
Accesibility Attributes
Web accessibility makes web content and web applications more accessible to disabled people. It's especially helpful in dynamic content changes and development of advanced user interface components with HTML, Javascript and related technologies. Smart HTML elements framework offers full accessibility support for it's web components.
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.
Keyboard Interaction
The following keyboard shortcuts are available to interact with the Switch button:
Key | Action |
---|---|
Space | Switches on/off the button. |
Additional information on WAI-ARIA for the SMART Framework can be found here.