Progress
A native <progress> element. Leave value off and it is genuinely indeterminate, rather than claiming an unknown task is 0% done.
Example (a11y tier)
Import
import Progress from 'abaabil/progress' // structure onlyimport Progress from 'abaabil/progress/styled' // + CSSimport Progress from 'abaabil/progress/a11y' // + label/description/valueTextWhat a progress bar announces
A bare <progress value="3" max="8"> is announced as “38 percent”. That is right for a percentage and wrong for everything else, which is most things: files copied, steps completed, seconds remaining. valueText sets aria-valuetext, which assistive technology reads in place of the percentage.
A <label> alone does not name it
<progress> is a labelable element, so <label for> is not wrong, but no accessible name is computed from it: axe names an <input> from identical markup and names neither <progress> nor <meter>. This tier points aria-labelledby at the label as well, so the name is explicit rather than left to differ between implementations. It is the kind of gap that a passing audit misses, because axe's progress-bar rule only inspects an explicit role="progressbar" and skips the native element entirely.
Props
| Prop | Type | Default | Tier | Description |
|---|---|---|---|---|
value | number | — | all | Omit for an indeterminate bar. |
max | number | 100 | all | — |
className | string | — | all | Merged with the base class. |
label | string | — | a11y | Rendered as a real <label> and wired via aria-labelledby. |
hideLabel | boolean | false | a11y | Hide it visually; it stays in the accessibility tree. |
description | string | — | a11y | Help text, wired into aria-describedby. |
valueText | string | — | a11y | Announced instead of the percentage. |