Skip to content
AITroveRead. Build. Understand.
Make this comfortable

HTML status region: announce a changed result without stealing focus

Last updated: 5 Oct 20267 min read
tutorial
IntermediateBy AITrove Editorial

A status region is a live announcement target for nonurgent changes to an interface.

Use it for a real task

A receipt search updates results after a request. Keep the status node in the document from the start, then update its text when the request succeeds or fails. The role tells compatible assistive technology that the new message matters without moving keyboard focus away from the search field. A static initial string alone is not a request result and should not pretend that a search ran.

html
<form action="/receipts/search" method="get">
  <label for="receipt-query">Find a receipt</label>
  <input id="receipt-query" name="query" type="search">
  <button type="submit">Search</button>
</form>
<p id="receipt-status" role="status"></p>

What the markup guarantees

The markup establishes a region; it does not fetch results or fill it. A working client must update the text, and a server-rendered search should include a visible result heading or summary after navigation.

Cost and limits

A single short region is cheap. Repeated rapid announcements can overwhelm users, so report meaningful outcomes instead of every network or keystroke event.

Common Mistakes

  • Do not place a stale success message in an empty status node.
  • Do not move focus for every minor result update.
  • Do not rely on status text as the only visible result.

Connected lessons

Continue with the connected Web Development lesson: DOM events: enhance a working control without losing its baseline.

html
accessibility
Storage details