ARIA property
aria-live
Marks a region whose updates should be announced, and how urgently.
It turns a container into something assistive technology watches, so later changes inside it get read out. Polite waits for a gap in whatever is being said. Assertive interrupts. Off stops the watching without removing the attribute.
Which roles may carry aria-live
- Value
- token
- Filed as
- A property, which is how ARIA files it and not a rule about how often it changes.
- Roles that may carry it
- Any role. This one is global, which is why no individual role lists it.
Global means no role has to grant permission for it. There is one more place to check, because ARIA in HTML sets rules per element as well as per role, and it allows no aria-* attributes at all on a datalist or on the html element. Past that, the way a global attribute goes wrong is rarely where it sits. It is whether it is still true, which is the next section.
Every role above comes from the specification's own list for this attribute, checked name for name. The normative definition stays with the W3C, in the aria-live section of the ARIA specification.
Keeping aria-live true
The bug here is mechanical and it is the most common one in ARIA. The region has to be in the page before the message arrives, because what gets conveyed is a change to a region already being watched. Inject the container and its text together and most screen readers announce nothing at all. Render the empty container on load, then put the text into it. Assertive deserves more caution than it usually gets, because an assertive update can clear the polite queue rather than merely jump ahead of it, and the spec advises against it unless the interruption really is worth somebody's place in their task. Some roles bring a value with them, so an alert is already assertive, a status is already polite, and marquee and timer are both off. One last thing. Moving focus to a change is itself a change of context, so announcing it here and moving focus to it announces it twice.
How aria-live gets checked
There are test rules that check an ARIA attribute is one that exists, is allowed on the role underneath it, and carries a value of the right type. What they map to is ARIA's own author requirements rather than any WCAG criterion, so a misplaced attribute breaks ARIA without being a WCAG failure by itself. It becomes one under 4.1.2 Name, Role, Value the moment the missing or wrong value means the control's state cannot be worked out programmatically, which is what usually happens next.
Nothing automated catches the failure this page is about. A stale value is a valid value, on a permitted role, with the right type. It is only wrong about the world.
Attributes you will meet alongside aria-live
- aria-atomic Whether an update should be read whole, or only the part that changed.
- aria-busy Says a region is still being updated, so wait before announcing it.
- aria-controls Points at what this control operates. A combobox has to say what it opens.
- aria-current Marks the one item in a set that represents the here and now, such as the current page in a nav.
- aria-describedby Points at further description, read after the name. Hints and error text usually go here.
- aria-details Points at richer explanation elsewhere in the page, which people can navigate to rather than have read out.
- aria-flowto Overrides reading order by pointing at what should be read next. Rarely the right answer.
- aria-hidden Removes an element from the accessibility tree while leaving it on screen.
Every ARIA state and property · Every ARIA role · ARIA explained