On this page

Bubble

Keys, what Bubble gives you and what your team does.

Conformance

Bubble meets WCAG 2.2 level AA when used as described on these pages. A plain bubble is text with no role. A bubble rendered as a button or link is that native element.

Keyboard

Key Action
Tab Moves focus to a bubble rendered as a button or link, and to buttons inside reactions.
Enter Presses the focused bubble button or follows the link.
Space Presses the focused bubble button.

What Bubble gives you

  • The Button focus ring on a bubble button or link: 2 px color.border.focus, 2 px outside the edge.
  • Text and fill pairs from the contrast check: every pair the variants use reaches 4.5:1, including color.text.inverse on the bold fill and color.text.danger on its tint, at rest and on hover.
  • Hover by state tokens, never by transparency.

What your team does

  • Don’t rely on colour to say who wrote a message: keep the sender name in the message header.
  • For a failed message, say it in words in the bubble or the footer.
  • Give reactions text for screen readers (“2 party reactions”), and hide the emoji with aria-hidden if the text already says it.
  • Name a reaction button by what pressing it does (“Add a thumbs up”), and set aria-pressed.
  • Wrap a set of suggested replies in an element with role="group" and an aria-label.

WCAG criteria

Criterion Level How
1.4.1 Use of Color A The side, the sender and the text carry the meaning, not the fill
1.4.3 Contrast (Minimum) AA Text token pairs at 4.5:1 or more
2.1.1 Keyboard A Bubble buttons and links are native elements
2.4.7 Focus Visible AA Button focus ring