Skip to main content
WCAGrules
Quick navigation

live role

role="log"

A running record where new entries pile up, like a chat history or an activity feed.

What role="log" means, and when to use it

Use log where new entries pile up in order and the old ones stay, like a chat window or an activity feed. It is polite by default, and the reader hears each new entry rather than the whole history again.

The HTML element behind role="log"

HTML has no log element.

Live region roles announce changes nobody navigated to

A live region tells assistive technology to announce a change the user never went looking for. A validation error, a save confirmation, a count going up.

The container has to be in the page before the message arrives in it. Build the region and its text in the same step and the browser has nothing to compare against, so there is no change to detect and nothing is announced. Two of these roles also arrive with settings already applied. status is polite and atomic, and log is polite.

That timing mistake is invisible to a scanner, which sees a correctly built live region and reports no problem. It only shows up when somebody triggers the update for real with a screen reader running.

Where role="log" sits in the model

Inherits from
sectionstructureroletype
The name can come from
aria-labelledby or aria-label. Its own text does not become the name, so text inside it will not be read as one.

The normative definition stays with the W3C, so it cannot go stale here. log in the ARIA specification.

How a checker tests role="log"

This role carries no obligation of its own, so what a checker looks at is whether the role is a real one and whether it belongs on the element carrying it. These are the published test rules that apply.

The other live roles

  • alert An urgent message that screen readers announce the moment it appears.
  • marquee Content that scrolls, cycles or rotates on its own.
  • status A message worth announcing that is not urgent enough to interrupt what somebody is doing.
  • timer A counter that updates as time passes.

All 94 ARIA roles · ARIA explained · How accessible names are computed · Scan your own pages

Go somewhere useful

Find tools, resources and your workspace.

29 destinations