Accessibility & Standards

Live Region

Definition

Screen readers normally speak what has focus. Anything that changes elsewhere — a file count updating, a validation summary appearing, a search result total — happens in silence unless the page says otherwise. Marking a container with aria-live tells the browser to watch it and pass changes to the accessibility tree as announcements. The attribute takes three values: off, which is the default, polite, which queues the announcement until the reader pauses, and assertive, which interrupts immediately. Two ARIA roles carry these behaviours implicitly, so role status behaves as polite and role alert behaves as assertive, and using the role is usually tidier than setting the attribute by hand. WCAG added 4.1.3 Status Messages at level AA in WCAG 2.1 in 2018, which is the criterion that requires status changes to be available without a change of focus.

Why It Matters

Without one, half of a modern interface disappears for anyone not watching the screen. Submit a form and the error summary is invisible, filter a list and the 'no results' message goes unheard, start an upload and the progress that everyone else can see reports nothing. In a single-page application, where clicking a link swaps content instead of loading a new page, even the page change itself can pass unannounced. Overused, the same feature becomes a fault of its own: an assertive region tied to a per-keystroke character count interrupts every word the reader types.

How It Works

The container has to exist in the document before the change happens, because assistive technology only watches regions it has already seen — inserting a fresh div that already contains the message frequently announces nothing. Put an empty element with role status in the markup at load time, then set its text content when there is something to report. Keep the message short, because the whole region is read out; aria-atomic set to true forces the entire region to be spoken rather than only the changed part, which suits a sentence that must be heard whole. Reserve assertive and role alert for things that genuinely cannot wait, such as a session about to expire, and use polite for everything else. A live region is not a substitute for an ARIA label on the control that triggered the change, and it is not a place to put content the reader will need again later.

Real-World Example

A studio publishes a one-page file browser at team-files.99helpers.site that filters a list of downloads as you type. Typing 'invoice' narrowed 40 rows to 3 with no announcement, so a screen reader user heard only their own keystrokes. Adding an empty element with role status above the list, updated to read '3 files match invoice' after a short debounce, made the result audible without stealing focus from the search box. The page is plain static HTML served from 99helpers, so the whole change was four lines and one redeploy.

Common Mistakes

  • Creating the live region and its message in the same update — the browser was not watching that node beforehand, so the text arrives with nothing listening and is never spoken
  • Marking everything assertive because it feels more important — each announcement cuts off the one before it, and the reader loses the thread of what they were doing
  • Toggling a region between display none and visible to 'show' a message — several screen readers treat that as nothing having changed, so the message stays silent

Related Terms

Put a file online in seconds

Drop in a document, an image, a page or a whole static website and share the link — free, with no build step and no server to set up.

Host a file free →