Demo

Menu open state, keyboard and ARIA

Documented in Menu Button and Menu.

Menu open state, keyboard and ARIA

A controlled MenuButton that logs every onOpenChange reason and source, can veto closing on an outside press, and reads back the trigger's ARIA and data attributes and the menu markup in the page.

Chosen: nothing yet

Trigger aria-expanded
false
Trigger aria-controls
(absent)
Trigger data-open
(absent)
Popup
(none)
Roles inside the popup
(none)
Menus for this trigger in the page
0
    Open or close the menu to log onOpenChange.