status

Term side of the Card.
Topic: Live Region Roles
Unit title: status
Categories: Role
Explanation side of the Card

Explanation: The role for a live region with advisory information that is not urgent, like 'Saved' or a search result count. It has implicit `aria-live='polite'`, so screen readers announce changes without interrupting the user.

Example

Wronghtml
<div id="msg"></div>
<script>
  // inserted with text, often missed
  msg.innerHTML = '<p role="status">Saved</p>';
</script>
Righthtml
<div id="msg" role="status"></div>
<script>
  msg.textContent = "Saved";
</script>

The live region exists first and only its text changes, so screen readers reliably announce the update.

Common mistakes

  • Adding the status element with its text at the same time, so nothing is announced.
  • Using role='status' for every update, flooding the screen reader.

Key points

  • The role='status' container is in the DOM before its text changes, not inserted together with the message.
  • Status messages do not move focus; the user stays where they are.
  • Urgent errors use role='alert', not role='status'.

Interview questions

What is the difference between role='status' and role='alert'?

status is polite and waits until the user is idle; alert is assertive and interrupts. Use alert only for urgent, time-sensitive messages.

Do I need aria-live='polite' with role='status'?

No. role='status' already implies aria-live='polite' and aria-atomic='true'. Adding them again is harmless but redundant.

Does the output element have the status role?

Yes, <output> maps to the status role, so its changes are announced politely.

Analytics cookiesWe'd like to use analytics cookies to see which pages are useful. They're set only if you accept. Privacy Policy