The merge request does not create a separate landmark element. It adds role="region" and aria-label to the existing [data-drupal-messages] container when a message is present, and removes them when the last message goes. This page models that lifecycle on one persistent container.

The container below is in the DOM from the start. Its identity never changes. This is a stand-in for the default container, not Drupal.Message; the attribute lifecycle matches, the code does not.

Demonstration controls

No messages. The container has no landmark attributes.

Expected states

The container stays; only its landmark attributes change
ActionExpected landmark behaviour
Initial empty containerNo landmark: no role, no name.
Add the first messageThe container becomes a region named “System messages”.
Add more messagesThe same region remains; the messages are inside it.
Remove one messageThe region remains while any message is left.
Remove the final messageThe landmark attributes are removed; the empty container stays.
Add another messageThe attributes are restored on the same container.

What to check

How this corresponds to the merge request