Popovers are floating overlays that contain additional information or interactive content.

Structure

The Popover dialog container uses an HTML <div> with the dialog ARIA role to communicate its purpose to assistive technology. The Popover is rendered inside a portal so it sits outside the main document flow, preventing interference with page layout.

The Popover uses Floating UI for positioning, interactions, and accessibility. Floating UI's useRole assigns the dialog role and related ARIA attributes, useClick/useHover/useFocus manage trigger behavior, useDismiss handles dismissal with the Escape key and outside clicks, and FloatingFocusManager manages focus when the Popover is closed.

ARIA

table
ElementAttributeDescription
Drag handlearia-grabbedSet to true while the Popover is actively being dragged via mouse or keyboard. Only present when the Popover is draggable.
Drag handlearia-labelProvides instruction on how to use the drag handle with a keyboard.
Popover contentrole="dialog"Identifies the floating container as a dialog.
Triggeraria-expandedSet to true when the Popover is open, false when closed.
Triggeraria-haspopupSet to "dialog" to indicate the trigger opens a dialog.

Focus trapping

When enabled, focus trapping confines keyboard focus to elements within the Popover until it's dismissed. This prevents the user from being forced to cycle through all page elements before landing back in the Popover.

The first focusable element within the Popover receives focus first. If necessary, another element may be targeted as the first focusable element with the initialFocus. When the Popover closes, focus returns to its trigger element.

Visually hidden dismiss buttons can be rendered before and after the Popover content for screen reader users.

Keyboard

Popover

table
KeyFunction
Enter/SpaceActivates the trigger to open or close the Popover.
EscapeCloses the Popover and returns focus to the trigger.
Shift+TabMoves focus to the previous focusable element. When focus trapping is enabled, wraps from the first focusable element to the last within the Popover.
TabMoves focus to the next focusable element. When focus trapping is enabled, wraps from the last focusable element back to the first within the Popover.

Drag handle

table
KeyFunction
SpaceToggles keyboard drag mode on the drag handle.
EscapeExits keyboard drag mode without closing the Popover.
Moves the Popover by 1px in the corresponding direction while keyboard drag mode is active.
Shift+Moves the Popover by 10px in the corresponding direction while keyboard drag mode is active.