Keyboard interaction

KeyAction
Enter or Space on the triggerOpens or closes the popover.
TabMoves into an open popover, which comes right after its trigger.
EscapeCloses the popover and returns focus to its trigger, or hides the hovercard.

Accessibility notes

  • The popover is a non-modal dialog: name it with aria-label or aria-labelledby. Its trigger gets aria-haspopup and the browser’s aria-expanded.
  • The hovercard is a tooltip and its trigger’s aria-describedby, so its text is read with the trigger. Keep controls out of it; use a popover for those.
  • The hovercard meets WCAG 1.4.13: Escape hides it without moving focus, the pointer can move onto it, and it stays while hovered or focused.