demo · v133
Popover vs Dialog — converged dismiss
dialog closedby=any brings <dialog> in line with the light-dismiss behaviour [popover] has had since v114. Compare the two side by side and pick the right primitive: popover for menus and disclosures, dialog when modality and the top-layer focus trap matter.
<dialog closedby> isn't supported here. Chrome 133+ required.[popover]
I dismiss on outside-click or Escape by default. No modal scrim. Focus is not trapped.
<dialog closedby="any">
when to use which
Popovers are inert until interaction. They don't trap focus and don't have a modal scrim — perfect for menu surfaces, hovercards, secondary disclosures. Use <dialog> when the response is a decision the user needs to make: cookie consent, destructive confirm, payment confirmation. The dialog's top-layer behaviour and focus trap come along for the ride; closedby is the new lever for how light its dismissal is.