Progress Bar
Provide up-to-date feedback on the progress of a workflow or action with simple yet flexible progress bars.
Example
Default progress bar
Striped progress bar
Animated progress bar
Stacked progress bar
Anatomy
- Indicator: Tells the users how far along in a process they are in.
Usage guidelines
Best practices:
- Only hide the label when it is absolute clear to the user which process the progress bar represents. Note that you are still required to pass an appropriate label which will be read by screen readers.
Progress bar should be used when:
- You want to show users where they are in a process.
- You want to display the progress of an operation, e.g when a user uploads a document.
- The progess can be described with quantitative information, such as a percentage.
Progress bar should not be used when:
- Manual user actions are required to progress, use a stepper instead.
- The progress is determined by user actions such as tutorials completed, or storage space, rather than system actions.
Usability guidelines
Use consistent progress bars
Do use one type of indicator bar style and not switch between as this may cause confusion to the user.
Behaviour
Keep progress bar moving to allow users to know their task is progressing. Users may associate a stationary indicator as a stalled process.
Accessibility guidelines
Aria attributes
-
Give an
aria-label
with the title of the progress bar when there is not a visible title. -
Set
role="progressbar"
. -
If the progress bar is describing another region of the page, use
aria-describedby="progressbar-id"
to connect the two elements. -
Set
aria-valuemin
andaria-valuemax
to indicate the minimum and maximum progress indicator values. Otherwise, their implicit values follow the same rules as<input-type="range">
in HTML:- If
aria-valuemin
is missing or not a number, it defaults to 0 (zero). - If
aria-valuemax
is missing or not a number, it defaults to 100.
- If
-
Supply a value for
aria-valuenow
unless the value is indeterminate, in which case, omit thearia-valuenow
attribute. Update this value when the visual progress indicator is updated. -
If the progress bar is describing the loading progress of a particular region of a page, use
aria-describedby
to reference the progress bar status, and set thearia-busy
attribute totrue
on the region until it is finished loading.
Keyboard accessibility
If the progress bar is meant to be purely informational, it does not need to be keyboard focusable or operable.Focus indicator
An informational progress bar generally doesn't need to be focusable.Progress bar design tokens
Last updated 02 October 2024