Skip to main content
WCAGrules
Quick navigation

live role

role="timer"

A counter that updates as time passes.

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

Use timer for a counter that changes as time passes. Be careful with it, because a timer announcing every second is unusable. Most of the time the useful pattern is a silent timer with a status message at the points that matter.

The HTML element behind role="timer"

HTML has no timer 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="timer" sits in the model

Inherits from
statussectionstructureroletype
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. timer in the ARIA specification.

How a checker tests role="timer"

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.
  • log A running record where new entries pile up, like a chat history or an activity feed.
  • 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.

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