MiHCM
overlay/@mihcm/ui·v0.21.0·stable

Tooltip

Hover/focus tooltip (web) or long-press tooltip (native). Configurable side and delay.

WCAG 2.1 AA — release blocker

Keyboard

KeyAction
TabFocus the trigger, which shows the tooltip.
EscapeDismiss the tooltip while it is visible.

No activation key needed — the tooltip appears on focus automatically.

Screen reader

  • Tooltip content renders with role="tooltip".
  • The trigger references the tooltip via aria-describedby, so assistive tech reads the hint after the trigger's accessible name.
  • Shows on mouseenter and focus; hides on mouseleave, blur, and Escape.

Focus management

  • Focus stays on the trigger element. The tooltip itself is not focusable.
  • Dismissing with Escape does not move focus.

React Native

  • Triggers on onLongPress — no hover on touch devices.
  • accessibilityHint is set to the tooltip content string.

Color is never the only signal

  • The tooltip background uses bg-primary with text-primary-foreground — 4.5:1 contrast verified in light and dark.

Audit checklist

  • role="tooltip" present on the content element
  • aria-describedby links trigger to tooltip
  • Visible on keyboard focus, not just mouse hover
  • Escape dismisses without moving focus
  • No interactive elements inside the tooltip
  • 4.5:1 contrast in light and dark