WCAG Encyclopedia

4.1.3 · RobustLevel AA

Status Messages

When something important changes without moving focus — a result count, a saved confirmation, an error appearing — it has to be announced. Moving focus to it would be a change of context; this is how you tell people without interrupting them.

Principle
Robust
Guideline
4.1
Level
AA
In WCAG since
2.1
Number
4.1.3

Broken, then fixed

The same interface twice: first with the mistake, then with the smallest change that fixes it.

Broken: The basket updates silently.
Basket (3) → Basket (4)announced as— nothing —

The number changed in the corner of the screen. A screen reader user pressed Add and heard silence; they have no way to know whether it worked.

Fixed: A live region announces it, without stealing focus.
Basket (3) → Basket (4)announced as"Added. 4 items in basket."

role="status" for routine updates, role="alert" for problems that need interrupting. The container has to exist in the DOM before the text is put into it, or many screen readers announce nothing. This page uses exactly this for its filter result count.

What changed in the code

The fix as a diff: removed lines are marked with a minus, added lines with a plus.

Markup diff — basket.js
removed: counter.textContent = `Basket (${n})`;
// <p id="status" role="status"></p> already in the DOM
added: counter.textContent = `Basket (${n})`;
added: status.textContent = `Added. ${n} items in basket.`;

Announce sparingly. A live region that fires on every keystroke is as unusable as one that never fires at all — which is why this page’s scroll position indicator is not one.

Watch it happen

This demo plays the failure out over time. It is silent and captioned, and you can pause or scrub at any point.

Basket (3)Add to basket

no live region

Screen readersilent

CaptionA basket with three items.
0:00 / 0:10CC onSilent · looping

How to test

Check your own interface against 4.1.3, one step at a time.

  1. List every message that appears without focus moving to it: a result count after filtering, a confirmation that something was saved or added, a progress update, an error summary shown after a form is sent.
  2. Open the accessibility inspector in your browser (in Chrome, Edge or Firefox DevTools) and select the element that holds each message. Check that it, or a container around it, has role="status", role="alert", role="log" or an aria-live attribute.
  3. Reload the page and check, before you trigger the message, that its container is already there. A live region added to the page together with its text is often not announced.
  4. Turn on a screen reader (NVDA on Windows, VoiceOver on a Mac), trigger each message and listen. It has to be read out while focus stays where you left it.
  5. Check which messages interrupt. Routine updates belong in role="status", which waits until the screen reader finishes speaking; only errors and warnings that cannot wait belong in role="alert".

Common questions

Does 4.1.3 apply when focus moves to the message?

No. A message that takes focus is read out when it gets focus, so 4.1.3 covers only messages that appear while focus stays somewhere else.

Does a loading spinner need to be announced?

Yes, when it tells people something they need to know, such as that their search is still running. Put a text alternative such as "Loading results" in a status region, so a screen reader says it without moving focus.

Should status messages use aria-live="assertive"?

Only for a message that cannot wait, such as an error or a session about to time out. An assertive region interrupts whatever the screen reader is saying, so a routine update belongs in role="status", which is polite.

Try it yourself

A lab is a small working piece of interface that you change yourself. Read its steps, use the controls under it, and watch the verdict line at the bottom: it says whether the criterion passes or fails as you go. Reset puts it back.

Try it: announce the basket

How to use this lab

  1. Goal. Let a screen reader user hear that an item went into the basket, without moving focus.
  2. The controls. The Put the message in a status region, role="status" tick box makes the message the mock shop shows when an item is added a status region or plain text. The Press Add to basket button adds an item, and the log under “Screen reader announced” shows what was said.
  3. Try this. The lab starts with the tick box clear. Press Add to basket and see that nothing is announced. Then tick Put the message in a status region, role="status" and press it again.
  4. What it means. With the message in a status region, 4.1.3 passes: the screen reader says it while focus stays on the button. As plain text, 4.1.3 fails, because the message changes on screen but screen reader users hear nothing and can’t tell the item was added. The verdict line under the lab says which.

The markup

<p>…</p>

Screen reader announced

Nothing announced yet.

4.1.3 fails

Also in guideline 4.1

Criteria in the same guideline often fail together.