Progress indicators
ExpressiveLinear and circular indicators, determinate or indeterminate, flat or wavy.
import { LinearProgressIndicator, CircularProgressIndicator } from '@windmorph/react';Keyboard
None. A progress indicator reports progress and takes no input, so it has no keyboard interaction.
Screen reader
- Role
progressbar, from React Aria, on both the linear and the circular indicator.- Accessible name
aria-labeloraria-labelledby, which the types require.- States announced
- A determinate indicator exposes its value from 0 to 1 (
aria-valuenow) and reads it as a percentage (aria-valuetext, "25%"). An indeterminate one has no value and announces that work is in progress.
The animated SVG drawing is hidden from assistive tech (aria-hidden).
Focus
None. A progress indicator is not focusable.
Touch target
None. A progress indicator takes no presses, so it has no touch target.
Motion
- Under reduced motion the wave of a wavy indicator stops travelling, and changes of amplitude and value snap instead of easing; a value that arrives on an indeterminate indicator replaces the moving lines at once.
- Indeterminate motion stays, because it conveys that work is going on.
What you need to do
- Name every indicator with what is loading and where: "Loading news article" or "Refreshing page", not just "Loading".
- Inside a button, remove the track (
track={false}) and colour the indicator like the button's label (classNames={{ indicator: 'stroke-current' }}), so it keeps a 3:1 contrast against the button. - Keep the linear stop dot (
stopIndicator) unless the track has at least a 3:1 contrast with what surrounds it, so the end of the track stays easy to see.