The proposed change makes system messages easier to locate and revisit by adding one named landmark. Existing message roles and announcement mechanisms are retained.

Three different things

What the merge request changes, and what it leaves alone
ConceptWhat it doesIn !17968
Landmark navigation Lets a person jump to a named area with the landmarks rotor or shortcut. Added: one region named “System messages”.
Live-region semantics Tells assistive technology that a message appeared. role="status" is polite; role="alert" is assertive. Unchanged: status, warning and error keep their roles.
Explicit announcements Drupal.announce() writes a message to a separate live region. Drupal uses it for JavaScript messages. Unchanged: the existing calls stay; the landmark does not call it.

Messages were already reachable through reading order and the visually hidden headings. The landmark adds a more direct route; it does not make the messages newly audible, and it does not replace headings.

Examples

The messages look the same

Before: unnamed container

Status

Your changes have been saved.

After: region “System messages”

Status

Your changes have been saved.

Visual replicas with no live roles. The real examples are the Before and After pages.

The only HTML change

Before, from core/modules/system/templates/status-messages.html.twig:

<div data-drupal-messages>
  <div role="status" aria-label="Status message">…</div>
  <div role="alert" aria-label="Warning message">…</div>
  <div role="alert" aria-label="Error message">…</div>
</div>

After, with the added attributes highlighted:

<div data-drupal-messages role="region" aria-label="System messages">
  <div role="status" aria-label="Status message">…</div>
  <div role="alert" aria-label="Warning message">…</div>
  <div role="alert" aria-label="Error message">…</div>
</div>

The native alternative, which is not the proposed implementation:

<section aria-label="System messages">
  <div role="status" aria-label="Status message">…</div>
  <div role="alert" aria-label="Warning message">…</div>
  <div role="alert" aria-label="Error message">…</div>
</section>

No aria-live, no new role on the message groups, no heading change and no JavaScript are added for server-rendered messages.

Accessibility trees

Before

main
├─ status "Status message"
├─ alert "Warning message"
└─ alert "Error message"

After

main
└─ region "System messages"
   ├─ status "Status message"
   ├─ alert "Warning message"
   └─ alert "Error message"

Landmark navigation

Before, the landmarks list has the page landmarks (banner, navigation, main, content information) but no message area. After, it also has “System messages”. Choosing it moves to the region. The heading order and reading order do not change, so a person who navigates by heading or by reading can still do that.

Announcements: what changes, and what does not

Test it with a screen reader

VoiceOver on macOS

  1. Open Before, press VO+U and choose Landmarks. There is no “System messages” entry. The messages are still in reading order and under their headings.
  2. Open After and repeat. “System messages” is listed; choosing it moves to the region.
  3. Open Server and JavaScript and clear the JavaScript messages. The server messages and the landmark remain.
  4. VoiceOver may or may not announce the messages when a page opens. That is the existing live-region behaviour, not something the landmark adds.

NVDA on Windows

  1. Open Before and press D (next landmark) or NVDA+F7 → Landmarks. No “System messages” landmark.
  2. Open After and press D. “System messages” is announced as a region; Shift+D moves back.
  3. Open JavaScript messages, add a message and use D. Remove the last message; the landmark is gone.

These are instructions, not automated results. The Lab recorded scripted VoiceOver evidence, not a person using the rotor: see SCREENREADER.md.

What this demonstration is not

Source and evidence