Resonance Logo

Tooltip

A tooltip is a small popup providing brief contextual information when a user hovers over or focuses on a trigger element, and it must be dismissable with the Escape key.

Demo

Hover your pointer over the trigger element to reveal the tooltip. Then tab to the trigger with the keyboard to confirm the tooltip also appears on focus. While the tooltip is visible, press Escape to dismiss it. Notice that the tooltip content is read by a screen reader when the trigger receives focus.

Pattern 1 -- Hover / Focus

Provide your email address for account recovery.

Pattern 2 -- Click / Enter / Space

Choose a strong password.

What to Observe

Anatomy

[Anatomy image placeholder — will be added when assets are available]

  1. Trigger element: The focusable element (button, icon, or link) that a user hovers over or focuses on to reveal the tooltip; it carries an aria-describedby attribute pointing to the tooltip content.
  2. Tooltip container: The popup element with role="tooltip" and a matching id referenced by the trigger's aria-describedby.
  3. Tooltip text: The brief descriptive message inside the container; it supplements context but does not replace the trigger's own accessible name.
  4. Caret or pointer: An optional visual arrow connecting the tooltip bubble to its trigger, helping users understand which element the tooltip describes.

Accessibility Behavior

Common Mistakes

Why This Matters

Tooltips are frequently used on icon-only buttons, truncated text, and form field hints — exactly the places where supplemental context is most critical. When a tooltip only works on hover, keyboard users and touch-screen users get no access to that context at all. Worse, when developers use tooltips as the sole label for an unlabeled icon button, the button becomes completely meaningless to any user who cannot trigger the hover state. Proper tooltip implementation is one of the simplest ways to ensure all users have access to the same contextual information.

Accessibility Validation

This component is validated against internal accessibility criteria aligned with WCAG standards, using our internally developed system, Resonance Specs.

To learn more, please contact us.

Code

Reference Implementation