Click open the hamburger menu to see a demo of JavaScript-free interaction handling! By using the
popover
attribute, you can allow the browser to handle the keyboard management (including navigation via
esc
,
spacebar
, and
enter
), optional light-dismiss (clicking outside the boundaries of the popover), and click handlers such as on the open and close buttons. Note: I removed the backdrop styling because popover doesn't inert the page so it might be confusing.