Hi Giovanna,
As long as you “tab” to the menu (so that keyboard mode is enabled) you should find the escape key closes any open sub menu. If that isn’t what you’re seeing please post a link to your site so I can take a look.
Regards,
Tom
Hi Giovanna,
I don’t understand what you’re asking sorry. I believe that criteria is met already?
Regards,
Tom
i think it is not met,
You should be also able to dismiss sub-menu (by pressing ESC) that was hovered
Hi morelmm,
If the user is using a mouse to reveal the sub menu menu in the first place, they can move their cursor away to hide the sub menu. If they are using a keyboard to reveal sub menus, they can use the keyboard to hide them too (using escape).
Ebay, amazon and even the menu at the top of this page do not use this behaviour either. If you wanted to implement it, you could use the JavaScript API:
https://www.megamenu.com/documentation/javascript-api/
Regards,
Tom
hi Tom, thank You for quick response,
i think this is exactly the failure criterion:
“Failure to make content dismissable without moving pointer hover or keyboard focus”
Thanks for the API link, i surely will use it
I someone else would need it:
$(document).keyup(function(e) {
if (e.key === "Escape") {
$('ul.max-mega-menu').each( function() {
$(this).data('maxmegamenu').hideAllPanels();
});
}
});
HI,
Please I have this same issue.
Did this code work for you?
If yes, where did you place the code in your theme?
Regards
Joba