How to build an accessible InlineLoading in React

role="status" with aria-live="polite" announces the label when the status changes; the icon is decorative (aria-hidden) so meaning is carried by the text and color is never the sole signal

When to use a InlineLoading

When not to use it

Accessibility

Role status, verified at WCAG 2.2-AA.

Common mistakes

Avoid: <Spinner /> with separate manually-managed success and error markup

Prefer: <InlineLoading status={status} /> driving icon and color from one status prop

A single status keeps the icon, color, and announced label in sync and prevents mismatched states

Example

<InlineLoading status="active" />

See the full InlineLoading reference →