[wp-trac] [WordPress Trac] #49950: Twenty Twenty: with horizontal menu, submenu should be dismissible

WordPress Trac noreply at wordpress.org
Mon Mar 17 22:59:59 UTC 2025


#49950: Twenty Twenty: with horizontal menu, submenu should be dismissible
-------------------------------------+-------------------------------------
 Reporter:  lcarevic                 |       Owner:  joedolson
     Type:  defect (bug)             |      Status:  assigned
 Priority:  normal                   |   Milestone:  6.8
Component:  Bundled Theme            |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:  accessibility,
  has-testing-info                   |  javascript, tests
-------------------------------------+-------------------------------------
Changes (by joedolson):

 * keywords:  has-patch needs-testing => has-patch needs-testing has-
     testing-info


Comment:

 I've updated this with a heavily revised PR that improves the focus
 handling and predictability of behavior. To be thorough, this should be
 tested with a fairly deeply nested menu. I tested with a depth of three
 sub-menus, each with two items.

 1) Tab through to open all sub menus.
 2) From each sub menu, hit `esc`.
 3) The `esc` key will move focus to the parent item that contains the
 current menu. Since focus on that location triggers the sub menu, this
 does not close the current menu, but will close any menu that is a child
 of the current menu.
 4) When closing the last submenu, focus is moved to the main menu item,
 and the 'closed' class is assigned to the list item, to prevent the menu
 from re-opening on the next `tab` press.
 5) Press `tab` to navigate to the next main menu item.
 6) Press `shift + tab` to navigate backwards, which should land you in the
 last item of the last sub-menu for the previous parent.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49950#comment:53>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list