Switch
Switches or Toggles are a special type of input widget that can be used to switch between two states. They are commonly used in forms to toggle between different options or settings. Toggles can be used as an input element or as a button element.
Design Hints
Accessiblity Hints
Simple Switch
A simple switch input to toggle between two states.
Alternate Simple Switch
An alternate style for simple switches.
Accessibility Testing Status
Component | NVDA | Windows Narrator | WAVE | Axe | IBM Equal Access |
---|---|---|---|---|---|
Simple Switch | Yes | Yes | Yes | Yes | Partial* |
Alternate Simple Switch | Yes | Yes | Yes | Yes | Partial* |
*The IBM Equal Access Accessibility Checker shows errors for missing aria-checked attribute even though its an input type checkbox with a role switch. If an aria-checked attribute is added, it would be double dipping since input type checkbox already conveys if it is checked or not.
For more information on the implementation of the switches, you can refer to the ARIA Authoring Practices Guide for Switch pattern