Barrierepruefung.de Web Accessibility Checker

WCAG 4.1.3 Status Messages: explained simply

In markup languages such as HTML, status messages must be programmatically determinable through role or properties, so that assistive technology can present them without their receiving focus. This covers messages about success or results, waiting, progress or errors that are not a change of context.

Last reviewed: Sources

What does the criterion require?

You put an item in the basket, and "1 item" appears at the top. People who see the page notice it in passing. Without suitable markup, however, a screen reader reads only what is at the current position. So the criterion requires that status messages can be determined through role or properties in the code. Assistive technology can then present them without moving focus, the user's current position on the page, to them. It applies to content in markup languages such as HTML.

A status message, as the standard defines it, is a change in content that is not a change of context and that provides information on one of these:

  • the success or results of an action, such as "Your message has been sent" or "18 results"
  • the waiting state of an application, such as "Searching"
  • the progress of a process, for example while a file is uploaded
  • the existence of errors, such as "Invalid entry"

This mainly helps blind and low vision users of screen readers and similar assistive technology. They learn what is happening without being interrupted unnecessarily. Assistive technology for people with cognitive disabilities can also highlight, delay or suppress messages to suit them.

What is not a status message?

  • Messages that receive focus. If a dialog with an error message opens and takes focus, that is a change of context. Assistive technology already presents it for that reason.
  • The new content itself. The list of search results is not a status message, but the words "18 results" are, provided they do not take focus or cause a page refresh.
  • Expanded and collapsed sections. Menus, accordions and tabs communicate their state under 4.1.2 Name, Role, Value.
  • Additional questions in a form. Their appearance is none of the four kinds of information.

The criterion does not force anyone to create new messages. It is about those that exist. That an automatically detected error is described in text in the first place is required by 3.3.1 Error Identification.

For HTML the W3C's techniques include role="status" for success, results and states (ARIA22), role="alert" or a live region, meaning a region whose changes are announced, for errors (ARIA19), and role="log" for sequential entries such as a chat (ARIA23). The container has to have this role before the message appears (ARIA22). If a persistent message changes, say from "0 items" to "3 items", the Understanding document advises marking up the whole text as the message rather than just the number; otherwise people may only hear "three". When a message such as "Please wait" disappears, that may be information too; it then needs an equivalent for assistive technology, invisible if need be.

Common failures

According to failure technique F103, it is a failure when a status message has no appropriate role or property and assistive technology does not in fact present it:

  • A search with no announcement. After searching, "0 results" appears in an ordinary paragraph. People who cannot see it have to find the message themselves (F103).
  • The role comes too late. A script inserts message and role at the same time, and the screen reader announces nothing. F103 treats this as a sign of a failure.
  • A form sent in silence. "Thank you, we have received your message" appears below the contact form, without a role or property; focus stays on the button, and the screen reader announces nothing.

Checked automatically and checked by you

What the automated check detects

The automated check does not measure this criterion. It is covered by a question in the manual checks.

What you check yourself

You answer this question in the manual checks of your scan.

Are status messages announced without moving focus?

  1. On your website, trigger messages that appear without the page reloading or focus jumping to them: "5 results" after a search or filter, "Added to basket", "Form submitted", "Loading …", a progress bar, error notes such as "Invalid entry" or "5 errors in the form". Not meant is anything that receives focus or changes the context, such as an error message in a dialog or a new page, nor content that appears through expanding and collapsing, nor the list of results itself; there only the short message about the result counts. If there is no such message, choose "not applicable".
  2. Test every message with a free screen reader (NVDA on Windows, VoiceOver on Mac): trigger it and leave focus where it is. The message must be announced by itself; if the screen reader stays silent, that is a defect.
  3. Without a screen reader: right-click the message and choose "Inspect" (in some browsers "Inspect Element"). The element of the message or an element enclosing it must carry a fitting role or property, for example role="status", role="alert", role="log", role="progressbar" or an aria-live attribute. If you can carry out neither of the two tests, choose "I cannot judge this".

Classification

Level
AA
Introduced in
WCAG 2.1
W3C explanation
Understanding 4.1.3