# \[aria-live\]

> The `aria-live` ARIA attribute indicates how updates to an element's content should be announced by assistive technologies.

## How does aria-live work and when do I use polite vs assertive?

The attribute that indicates how updates to an element should be announced by assistive technologies. It helps users stay informed about changes to dynamic content, such as notifications or live updates.

- Topic: Global ARIA Attributes
- Type: attribute

## Example

Wrong:

```html
<script>
  const msg = document.createElement("div");
  msg.setAttribute("aria-live", "polite");
  msg.textContent = "Saved";
  document.body.append(msg);
</script>
```

Right:

```html
<div id="status" aria-live="polite"></div>
<script>
  document.getElementById("status").textContent = "Saved";
</script>
```

Screen readers watch regions that already exist, so the empty region is in the page first and only its text changes.

## Common mistakes

- Injecting a new element with `aria-live` and the text at once, so nothing is announced.
- Using 'assertive' for every update, so screen readers keep interrupting the user.
- Putting `aria-live` on a large container, so every small change is read aloud.

## Key points

- The live region exists in the DOM before its content changes; it is not inserted together with the message.
- `aria-live='polite'` is the default choice; 'assertive' is kept for urgent errors.
- The live region wraps only the changing message, not a whole page section or form.

## Interview questions

### What is the difference between aria-live and role='status'?

`role='status'` is a live region with implicit `aria-live='polite'` and `aria-atomic='true'`. It also tells users the content is a status message.

### Why is my aria-live region not announced?

Usually the region was added at the same time as its text, is hidden with `display: none`, or the text did not actually change. Keep it in the DOM and change its content.

### Does aria-live='off' disable announcements?

Yes, updates are not announced unless the user is focused on or inside the region.

## Related cards

- [Live Region](https://wonderium.dev/a11y/live-region.md)
- [status](https://wonderium.dev/a11y/status.md)
- [alert](https://wonderium.dev/a11y/alert.md)
- [\[aria-atomic\]](https://wonderium.dev/a11y/aria-atomic.md)
- [\[aria-relevant\]](https://wonderium.dev/a11y/aria-relevant.md)

---

- Level: [Accessibility](https://wonderium.dev/a11y.md)
- HTML version: https://wonderium.dev/a11y/aria-live
- Last updated: 2026-11-25
