Live regions are how a screen reader learns that something on the page changed without the user moving focus there, such as a form-save confirmation or a new chat message. They are also famously easy to get wrong: the wrong politeness setting, a conflicting role, or an invalid aria-relevant token can mean the announcement never happens or happens too aggressively. This tool validates your live-region markup against the ARIA spec.
How it works
The tool parses your HTML and collects every element that is a live region, either through an explicit aria-live attribute or through an implicit live role: alert, status, log, marquee or timer. For each one it checks:
- aria-live is one of
off,politeorassertive. Anassertivevalue withoutrole="alert"is flagged, because assertive interrupts the user and is usually meant only for true alerts. - Implicit roles are reconciled with any explicit
aria-live.role="alert"impliesassertiveplus atomic, androle="status"impliespolite; a conflicting explicit value is reported. - aria-atomic is
trueorfalseonly. - aria-relevant contains only the tokens
additions,removals,textorall, and a loneremovalsis flagged as noisy. - A region that is empty at load is noted as good practice, since the container should be registered before content is injected.
Example
<div aria-live="aggressive" aria-relevant="removals"></div>
This has two bugs: aggressive is not a valid aria-live value (the options are off, polite and assertive), and announcing removals alone is rarely useful. The tool reports both with the correct alternatives.
Tips and notes
- Default to
polite. Reserveassertive(orrole="alert") for errors and other interruptions the user must hear at once. - Keep the region element in the DOM from page load and only change its text content; replacing the whole element can defeat the announcement.
- For a running log, use
aria-atomic="false"so only the newest line is read; for a short toast, usearia-atomic="true". - All parsing is local to your browser; the markup you paste never leaves the page.