Popover meets WCAG 2.2 level AA when used as described on these pages. It follows the non-modal Dialog pattern of the WAI-ARIA Authoring Practices.
Keyboard
| Key |
Action |
| Enter Space |
On the trigger, opens or closes the popover. |
| Tab |
Moves through the controls in the popover, then on to the rest of the page. |
| Esc |
Closes the popover. Focus returns to the trigger. |
What Popover gives you
aria-haspopup="dialog", aria-expanded and aria-controls on the trigger.
role="dialog" on the content.
- Focus moves into the popover when it opens and back to the trigger when it closes.
- Closes on Esc and on a click outside.
- An opaque edge (
color.border) and shadow, so it stands apart from the page in both themes.
What your team does
- Use a Button as the trigger (
as-child), with a name that says what opens.
- Name the popover when it holds a form: point
aria-labelledby on PopoverContent at the title.
- Keep the popover short; for a longer task, use a dialog.
- Don’t put the only way to finish a task in a popover people may not open.
WCAG criteria
| Criterion |
Level |
How |
| 1.4.11 Non-text Contrast |
AA |
Opaque color.border edge |
| 1.4.13 Content on Hover or Focus |
AA |
Opens on click only; closes on Esc |
| 2.1.1 Keyboard |
A |
Opens from the trigger; all content reachable with Tab |
| 2.4.3 Focus Order |
A |
Focus moves in on open and back to the trigger on close |
| 4.1.2 Name, Role, Value |
A |
aria-expanded, aria-controls, role="dialog" |