On this page

Message

What Message gives you and what your team does.

Conformance

Message meets WCAG 2.2 level AA when used as described on these pages. It is layout: it adds no role and takes no focus.

Keyboard

Message has no keys of its own. Buttons and links inside it, such as footer actions or a bubble rendered as a button, take focus in reading order.

What Message gives you

  • Reading order equals the visual order: align="end" reverses the row with CSS, so screen readers still read the avatar first, then the content.
  • Text colours from checked token pairs: color.text and color.text.subtle on every surface and neutral fill reach 4.5:1.

What your team does

  • Put messages in a Message scroller (role="log"), or in a list (as="li" inside a ul), so the count and the new messages are announced.
  • Name the sender in text. An avatar’s initials alone are not a name.
  • Write the status in words (“Read”), and render the time with as="time" and a datetime attribute.
  • Give icon buttons in the footer a name, with a tooltip set as the label.

WCAG criteria

Criterion Level How
1.3.1 Info and Relationships A Sender, content and time stay in one element, in reading order
1.3.2 Meaningful Sequence A align="end" changes only the visual side, not the order
1.4.3 Contrast (Minimum) AA Text token pairs at 4.5:1 or more