How to build an accessible TypingIndicator in React

role="status" with an accessible name ("Assistant is typing") is announced once when the indicator mounts; the dots are aria-hidden. They bounce only under prefers-reduced-motion: no-preference and otherwise rest as a static ellipsis; forced colours paint them CanvasText

When to use a TypingIndicator

When not to use it

Accessibility

Role status, verified at WCAG 2.2-AA.

Common mistakes

Avoid: Keeping TypingIndicator below a reply that is already streaming

Prefer: Swap TypingIndicator for the message content when the first token arrives

Two progress signals at once compete, and the status region would keep claiming nothing has been written

Example

<TypingIndicator />

See the full TypingIndicator reference →