Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Menubar Examples: When focus is in menubar, Escape should close any open submenus #451

Closed
mcking65 opened this issue Sep 7, 2017 · 8 comments
Assignees
Labels
bug Code defects; not for inaccurate prose Example Page Related to a page containing an example implementation of a pattern question Issue asking a question

Comments

@mcking65
Copy link
Contributor

mcking65 commented Sep 7, 2017

In the
navigation menubar example,
when users tab into the menubar, the submenu associated with the focused menubar menuitem is displayed, covering content underneath. There is no way to hide the submenu without tabbing out of the menubar. Shouldn't the Escape key hide the submenu?

To reproduce:

  1. After page load, tab to the menubar. The "About" menu item is focused and the "About" menu is expanded.
  2. Press escape.

Expected result: The "About" menu collapses.
Actual result: Nothing happens.

Similarly, while the "About" menu item has focus, continue by:

  1. Press down arrow. Focus moves to "Overview".
  2. Press right arrow. The "About" menu collapses, focus moves to "Admissions", and the "Admissions" menu expands.
  3. Press escape.

Expected result: The "Admissions" menu collapses.
Actual result: Nothing happens.

@mcking65 mcking65 added Example Page Related to a page containing an example implementation of a pattern documentation question Issue asking a question labels Sep 7, 2017
@mcking65 mcking65 modified the milestones: 1.1 APG Release 2, 1.1 Rec Sep 7, 2017
@devarshipant
Copy link

It seems to work with keyboard (IE 11). Pressing the Escape key sets keyboard focus on the parent menu item.
Sidebar - This maybe JAWS / IE 11 specific, but JAWS only speaks ‘use up and down arrow keys’ when keyboard focus is on the menu item. A helpful hint, but might help if it said use arrow keys instead. There are left and right arrow keys that make the menu navigation complete.

@tatermelon
Copy link
Contributor

I saw this issue on Mac Chrome. Esc works when focus was inside one of the submenus, but not when focus is on the menubar and a submenu is shown. You can repro by pressing right/left when a submenu is shown, then pressing Esc

@jongund
Copy link
Contributor

jongund commented Jun 15, 2018

I am not observing the problem with escape key not closing menus in the current menubar branch

@a11ydoer
Copy link
Contributor

a11ydoer commented Jun 18, 2018

@mcking65 In your second testing scenario, it is testing the escape key function when the focus is on parent menu, menubar item "Admissions", not on submenu(role=menuitem).
As it was mentioned in the "keyboard support" section, escape key should work on submenu(menuitem), not in the parent menu, menubar item. According to the APG example, the current example does not have any problem with escape key support.

@a11ydoer
Copy link
Contributor

a11ydoer commented Jun 18, 2018

ok. Group agrees that escape key should close wherever the focus is. The keyboard part of Menu, not submenu and coding and spec will be updated.

mcking65 pushed a commit that referenced this issue Jun 24, 2018
…ar (pull #723)

For issue #451:
* Adds ability to close open submenu  with Escape key when focus is in menubar.
* Add row to menubar keyboard table for Escape key.
@mcking65
Copy link
Contributor Author

@jongund, With d9a1f79, this issue is fixed in the editor menubar (menubar2).

However, we still have two open Escape key issues with the navigation menubar (menubar1):

  1. This issue Menubar Examples: When focus is in menubar, Escape should close any open submenus #451 for when focus is in the menubar.
  2. Issue Navigation Menubar Example: When focus is in 2nd level submenu, Escape is closing both submenus instead of focusing on parent in first level submenu. #595, where Escape is closing two levels of menu instead of returning focus to the parent menuitem when focus is in a sub-submenu.

@mcking65 mcking65 changed the title When focus is in a menubar, shouldn't escape close any open submenus? Menubar Examples: When focus is in menubar, Escape should close any open submenus Jun 24, 2018
mcking65 pushed a commit that referenced this issue Jun 24, 2018
…ar (pull #723)

For issue #451:
* Adds ability to close open submenu  with Escape key when focus is in menubar.
* Add row to menubar keyboard table for Escape key.
mcking65 pushed a commit that referenced this issue Jun 25, 2018
…ar (pull #723)

For issue #451:
* Adds ability to close open submenu  with Escape key when focus is in menubar.
* Add row to menubar keyboard table for Escape key.
@jongund
Copy link
Contributor

jongund commented Jun 25, 2018

Fix is in pull request 740

mcking65 pushed a commit that referenced this issue Jun 27, 2018
…r in second level submenu (pull #740)

For issues #451 and #795, change escape key processing.
When focus in menubar, close any open submenu.
When focus in second level submenu, close second level menu and focus parent menuitem.
@mcking65
Copy link
Contributor Author

With d9a1f79 for the editor menubar and 15b87d9 for the navigation menubar, this is now fixed. Thank you @jongund!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Code defects; not for inaccurate prose Example Page Related to a page containing an example implementation of a pattern question Issue asking a question
Development

No branches or pull requests

5 participants