A screen reader user may miss a status message that appears in a corner of the page, away from their current focus. A live region is an area whose dynamic updates can be announced by assistive technology without moving focus. It lets a visible message reach people who might not otherwise encounter it. section 6.1.7 section 6.1.5
Place the live-region container in the DOM before adding its message. When its content changes, the browser can expose the update through the accessibility tree; a screen reader may then announce it according to the region’s priority. section 6.1.7
<div aria-live="polite"> </div>
This empty container uses aria-live="polite" so later content changes can be announced without interrupting the current announcement. section 6.1.7 section 3.4.4
Choose an announcement level that fits the message:
- Use role="status" for non-urgent updates, such as “File uploaded.” It implies aria-live="polite", allowing the current announcement to finish first. section 3.4.4
- Reserve role="alert" for urgent, time-sensitive information. It implies aria-live="assertive" and can interrupt what the user is hearing. section 3.4.4
A form’s feedback loop
After submission, a toast might say that a request is being processed, then confirm that it was received. Give the toast a status role so its changing message is available to screen reader users as well as visible on screen. The same approach can communicate meaningful form changes, such as a recalculated shipping cost or a cleared form. section 6.1.7 section 6.1.5 section 6.1.10
<div id="toast" class="toast" popover="manual" role="status"> #A <span id="toast-message"></span> </div>
The toast container carries role="status"; its message span is updated as the task progresses. section 6.1.7
Tip: Announce meaningful changes, not every small progress increment. If a choice need not update automatically, a “Recalculate Shipping” button gives users control and avoids another announcement. For an important booking or payment, consider a lasting confirmation page rather than a temporary success message. Sound alone is not enough: important notifications also need visible text and a programmatically available update. section 3.4.4 section 6.1.5 section 6.1.7
