WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Closing expandable menus in dialog with Escape key

for

From: Detlev Fischer
Date: Mar 4, 2021 1:15PM


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.

Sent from phone

> Am 04.03.2021 um 20:09 schrieb Swift, Daniel P. < <EMAIL REMOVED> >:
>
> I would think that pressing escape would close both (the modal as well as the containing expanded menu). I suggest this because it sounds like you are already doing this with other modal boxes that appear on your site (using escape to close the box). I think it's important to keep this consistency. If all of your modal boxes have the menu … I could see a case for either as long as you are consistent.
>
> Daniel Swift, MBA
> Senior Web Specialist
> University Communications and Marketing
> West Chester University
> 610.738.0589
>
> From: WebAIM-Forum < <EMAIL REMOVED> > On Behalf Of Fire In The Sky
> Sent: Thursday, March 4, 2021 2:04 PM
> To: <EMAIL REMOVED>
> Subject: [WebAIM] Closing expandable menus in dialog with Escape key
>
> Hello,
>
> Looking for some thoughts on the situation where a dialog has
> expandable menus (similar to 3 dots more options menu), now when this
> menu is open then upon pressing Esc what would be the expected
> behavior. Should only the menu get collapsed or the the entire dialog
> should close?
>
> Currently since the Esc key is tied to the dialog, so even when the
> menu is expanded, pressing Esc results in closing the dialog.
>
> What could be the best way to handle this situation?
>
> Thanks!
> Ajay
> > > > > > > >