Stepper
Used to inform users which step they are at in a form or a process
Examples
Marker title
Marker title
Marker title
Anatomy
- Step number: Indicate the sequence of step.
- Marker title: Label that indicates the purpose of the steps.
- Track: A bar to show the progress through a set of steps.
Spacing
Within the stepper
Ensure that there is a min 32px horizontal spacing between dropdown item.
Ensure that there is a min of 4px vertical spacing between the marker icon and marker title.
Usage guidelines
Best practices:
- Steppers often contain forms and form controls. If validation errors inside of a stepper's form prevents users from moving to another step, make sure that your form controls communicate error messages to assistive technology. This helps the user know why they can't advance to another step.
Steppers should be used when:
- There are multiple steps in a form where content can be divided into logical steps.
Steppers should not be used when:
- Form is short. If a form or process has fewer than three sections, there is no need to use a stepper.
Usability guidelines
Keep marker title short and concise
Use labels that clearly indicate the purpose of the step and keep it as short as 1 to 2 words.
Logical ordering
Display the steps in order from left to right. Indicate to the user that they are performing a multistep process, and show the progress using the different states. Allow the user to return to a previous step to make ammendment.
Indicate the current step
Inform user of their current step within the process. This helps the user to know where they are in relation to where they have beem, and what sections are to follow. Use validation to confirm that a previous step has been completed.
Behaviour
The value should change by a defined step amount (e.g., 1) with each button press.
Accessibility guidelines
Aria attributes
-
Set
aria-current="step"
to indicate the currently selected step. -
Set
aria-disabled="true"
when the step is disabled.
Keyboard accessibility
- Tab or Shift-Tab to move focus forward and backwards between steps.
- Enter to navigate to the focused step. Only completed steps can be navigated to.
Focus indicator
- Ensure that focus indicators are highly visible and distinct when any interactive element within the stepper (e.g., increment/decrement buttons or the input field) is focused.
- Ensure a logical and intuitive focus order, usually moving from the decrement button to the input field and then to the increment button.
- When the value is updated, maintain focus on the active element to avoid disrupting the user experience.
Stepper design tokens
Last updated 02 October 2024