WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Closing expandable menus in dialog with Escape key

for

From: Patrick H. Lauke
Date: Mar 4, 2021 1:44PM


On 04/03/2021 20:15, Detlev Fischer wrote:
> I think the correct behaviour would be to close the expanded menu and leave the dialog open. The next ESC would then close the dialog.

Agreed. And how to technically do it? Depends how the setup is...but
basically keep track of what the topmost "context" is (in a dialog, in a
menu or popup, etc) and only trigger that. Or capture key events that
bubble up, and stopPropagation() when they're being handled).

P
--
Patrick H. Lauke

https://www.splintered.co.uk/ | https://github.com/patrickhlauke
https://flickr.com/photos/redux/ | https://www.deviantart.com/redux
twitter: @patrick_h_lauke | skype: patrick_h_lauke