Re:In Praise of the Unambiguous Click Menu
by layer8 on Saturday March 20, 2021 @10:22AM
(#26523425)
It’s okay for submenus to expand on hover, because the user is already mentally in a menu context if they clicked to open the top-level menu. That is common desktop behavior too. However, it’s preferable for the submenu to stay open until some other menu navigation takes place (e.g. a sibling submenu opens), because it’s much too easy to accidentally leave the submenu area with the pointer.
nav:focus-within > .submenu {display:block}
(Edit: oh it’s mentioned in the article briefly without much explication of the need for js)