ADVERTISEMENT
Google AdSense Slot (headerLeaderboard)

Set your Publisher ID in src/config/ads.ts to display live ads.

Web Accessibility (a11y) Tutorial• 6 min read

Live Regions: aria-live, status & alerts

Announcing dynamic asynchronous updates to screen reader users

Screen readers only announce what is currently under cursor focus. aria-live regions instruct screen readers to announce dynamic content injected into the page asynchronously.

polite vs assertive Modes

aria-live="polite": Waits until the user finishes their current task or pauses before announcing the update (ideal for search result counts, cart updates, chat messages).

aria-live="assertive" or role="alert": Immediately interrupts whatever the user is hearing to announce critical, time-sensitive alerts (e.g. session timeout warnings, server crash errors).

Dynamic Shopping Cart Live Region
<!-- Screen reader announces updates politely without interrupting user -->
<div aria-live="polite" class="sr-only" id="cart-announcer">
  Cart updated: 3 items, Total $89.00
</div>

<!-- High priority critical alert -->
<div role="alert" class="error-banner">
  Your session will expire in 2 minutes due to inactivity.
</div>
Live regions bridge the gap between asynchronous JavaScript updates and screen readers.
ADVERTISEMENT
Google AdSense Slot (inContentBanner)

Set your Publisher ID in src/config/ads.ts to display live ads.

Test Yourself With Exercise

+15 XP

Which `aria-live` setting announces updates politely without interrupting the user mid-sentence?