Conformance
Spinner meets WCAG 2.2 level AA when used as described on these pages.
Keyboard
A spinner takes no focus.
What Spinner gives you
role="status"and a name (aria-label, “Loading” by default).- Hidden, and silent, during the 1 second wait.
- Keeps turning under reduced motion, at the same speed, as the only sign that work is running.
What your team does
- Translate the name and say what is loading: “Loading orders”, “Đang tải đơn hàng”.
- If visible text beside it says the same, hide that text with
aria-hidden="true", or it is read twice. - Set
aria-busy="true"on the area that is loading, and remove it when the content arrives. - Remove the spinner when the work ends, and show the result or say it in a status line.
WCAG criteria
| Criterion | Level | How |
|---|---|---|
| 1.1.1 Non-text Content | A | aria-label |
| 2.2.2 Pause, Stop, Hide | A | Turns only while work runs, and goes when it ends |
| 4.1.3 Status Messages | AA | role="status" |