Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / HTML

aria-atomic — announce a complete changed message

`aria-atomic` specifies whether a live-region update should be presented as a whole or only as the changed part.

Version: WAI-ARIA 1.2

Syntax

<div aria-live="polite" aria-atomic="true">Total: <span>2</span></div>

ARIA uses the string values true and false, not an HTML boolean attribute enabled by presence. In an aria-live="polite" region containing “Total: 2 items”, true preserves context when only the number changes. It does not set announcement urgency or create a live region by itself.

The closest explicit attribute along the ancestor chain matters. Explicit false stops that search; without an applicable setting, the changed part is the default. Some roles provide implicit values: status, for example, is atomic by default.

The example changes only the span contents while retaining the complete message. Its DOM and atomic property in Chromium’s accessibility tree were checked. That does not prove a particular utterance by every screen reader: assistive technologies can combine updates. Avoid overly large regions that repeat long passages.

Examples

<!doctype html><meta charset="utf-8">
<div id="status" aria-live="polite" aria-atomic="true">Total: <span id="count">2</span> items</div>
<output id="result"></output>
<script>
document.querySelector('#count').textContent = '3';
const status = document.querySelector('#status');
document.querySelector('#result').textContent =
  'atomic=' + status.getAttribute('aria-atomic') + '; region=' + status.textContent;
</script>

Result

atomic=true; region=Total: 3 items

The test verifies exposed semantics and the final region contents; actual speech requires testing with the chosen screen reader.

Sources