Menu-button pattern built on the native Popover API. The menu is a popover
the trigger toggles through popovertarget, so opening, closing, Escape, and
light-dismiss all work with no JavaScript, and CSS anchor positioning places
it. This enhancer adds the menu semantics the platform doesn't: role="menu"
wiring, roving focus into the items on open, arrow/Home/End/typeahead
navigation, and a JS positioning fallback for engines without anchor
positioning. Open state is observable through onOpenChange/hl:open-change
and activating an item emits a cancelable hl:select.
Menu-button pattern built on the native Popover API. The menu is a
popoverthe trigger toggles throughpopovertarget, so opening, closing, Escape, and light-dismiss all work with no JavaScript, and CSS anchor positioning places it. This enhancer adds the menu semantics the platform doesn't:role="menu"wiring, roving focus into the items on open, arrow/Home/End/typeahead navigation, and a JS positioning fallback for engines without anchor positioning. Open state is observable throughonOpenChange/hl:open-changeand activating an item emits a cancelablehl:select.