Home › Forums › CSS › How to keep submenu navigation open after you click off? › Reply To: How to keep submenu navigation open after you click off?
Focus will only remain on an element if the user doesn’t click on anything else on the page. Take a look at this demo:
If you click on the list item it will gain focus and turn red, but if you click anywhere else on the page it will lose focus.
It is possible to build an accordion menu with focus states, but I don’t think anyone could recommend doing that as focus can behave unpredictably on non-form elements (especially on mobile devices).