← Hub · Open the note

Popovers (non-modal) — demo — BEFORE/AFTER

Goal: a popover that is reachable by keyboard, named for screen readers, closable with Esc, and that restores focus.

BEFOREHover-only help bubble (not keyboard reachable)

Problems: only appears on mouse hover, disappears when you move the pointer, and isn’t connected to the trigger for assistive tech.

?

Try: use Tab to reach the “?” and press Enter — nothing opens. The help only appears on hover.

AFTERButton + named popover + Escape + focus restore

Pattern: a real <button> controls a small non-modal popover with aria-expanded + aria-controls. On open, focus moves into the popover; on close, focus returns to the trigger.

Try: open, press Esc, and notice focus returns to the “?” button.

Notes