Toggle

Allows users to toggle a specific option on or off immediately.

WCAG Score - 2.2 AA Compliant


Provided by the component

  • The toggle has role="switch"
  • The toggle has aria-checked="false/true" based on it’s state.
  • The toggle has aria-describedby with a value of hint ID
  • The toggle has aria-labelledby with a value of label ID

Implementation considerations

Developers must do the following in the implementation to be considered fully accessible:

  • If Label is not provided, switch should have aria-label to provide label for assistive technologies.