Busy
Marks a region as loading, and says so.
Usage
Wrap any region whose content is being fetched or replaced. aria-busy tells assistive technology the region is unstable, so a
screen reader can hold off reading a half-built list, and the paired live region says what is
happening — aria-busy announces nothing on its own.
Nothing visible changes for a sighted user. That is the point.
Why it exists
This component was found by building a real app, not by planning. Writing its loading branch,
there was no way to express "this region is loading": Spinner is decorative and announces nothing, and aria-busy existed on two components out of sixty.
So a screen reader user got a second of silence and then a table appearing, with no warning either way.
The docs site never surfaced it, because it renders everything synchronously from a static registry. Latency is what exposed the gap — which is the argument for the example app in this repo.
Say what arrived
doneLabel should name the result, not the event. "3 projects loaded" beats "Done", which tells
the user the wait is over and nothing about what they got.
Omitting it means the user is told the content is loading and never told it finished. That is worse than saying nothing at all. It is left as your call, and it is the wrong one.
The delay
The loading message waits delay (400ms) before it is announced. A response
that arrives in 80ms does not need narrating; announcing it just talks over the user for no reason.
If the wait beats the delay, only the completion is announced — which is the right outcome: the content arriving is the part the user cannot see coming.
Props
| Prop | Type | Default |
|---|---|---|
busy required Whether the content is being loaded or replaced. | boolean | — |
label required Announced if the wait is long enough to notice. Say what is loading: "Loading projects" beats "Loading". | string | — |
doneLabel Announced when the wait ends. Say what arrived — "3 projects" — because "done" tells the user the wait is over and nothing about the result. Omitting it means the user is told the content is loading and never told it finished, which is worse than saying nothing at all. Pass it. | string | — |
delay Milliseconds before the loading message is announced. A response that arrives in 80ms does not need narrating; announcing it just talks over the user for no reason. If the wait beats this, only the completion is announced. | number | 400 |
class Extra classes merged onto the region. | string | — |
children required | Snippet | — |