Toggle

User stories

The following user stories can be used to understand when this component should be used, and how to know when it's been implemented correctly.

  • As someone using the component, I want to understand the label associated with each toggle.
  • As someone with a cognitive disability, I want to be able to understand the information required from me, and the options I can choose between.
  • As a keyboard-only user, I want to be able to navigate to each of the toggles and then activate them using the Space key.
  • As someone with a motor disability, I want to be able to easily select the correct toggle.
  • As a screen reader user, I want the group label about the toggles to be announced when navigating through the toggles.
  • As a screen reader user, I want any additional information provided alongside the group label to be announced when navigating through the toggles.
  • As a screen reader user, I want the toggle's label and its state to be announced when I navigate to it.
  • As a voice-control user, I want to be able to select a toggle using its associated label.

Test steps

Use these steps to check that the Toggle component has been implemented correctly:

  1. Turn on a screen reader.
  2. Navigate to the toggle(s).
  3. Verify that each toggle has a visible label.
  4. Verify that when navigated to, both the toggle's label and the group label are announced and that these match those visually present.
  5. Verify that the toggle can be activated using the Space key.
  6. Verify that a screen reader correctly announces the toggle's state.

Accessibility checklist

 

User stories

✅