Accessibility
- The root is
role="status", present in every state includinginactive, so the live region exists before the first message is written into it. aria-liveis chosen per state:offwhile inactive (nothing to say, and no announcement when the node is first inserted),politeforactiveandfinished, andassertiveforerror. Progress and success wait their turn; a failure interrupts, because the user is usually about to walk away.- The spinner shown during
activeis rendered withdecorative, so it has no role and no label of its own. One operation announces once. - The state icons are
aria-hidden. Every state is carried by its text, so nothing depends on the check mark, the warning mark or the colour. - The visible text is real text, not a
titleor a pseudo-element, so it is translatable, selectable and reachable by a screen reader's virtual cursor. - Anything placed in the default slot renders inside that same live region and is announced with the state. That is the reason for the one-action rule: a
Try againbutton is useful in an announcement, three sentences of advice are not. - Nothing here depends on colour.
--nb-c-successand--nb-c-dangerreinforce a mark and a sentence that already say the same thing, which is also why forced-colours mode costs this component nothing: the system palette flattens the two tones and the state still reads. - The component owns no focus. It never moves the caret, which matters because it changes while the user is typing in the same form.
- Reduced motion is inherited from
NbSpinner: underprefers-reduced-motion: reducethe arc becomes a complete ring that breathes in opacity, so nothing rotates and nothing freezes.