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

Implement focus management in main menu #5337

Closed
thibaudcolas opened this issue May 29, 2019 · 6 comments · Fixed by #7864
Closed

Implement focus management in main menu #5337

thibaudcolas opened this issue May 29, 2019 · 6 comments · Fixed by #7864

Comments

@thibaudcolas
Copy link
Member

thibaudcolas commented May 29, 2019

Issue Summary

Tabbing through Wagtail’s main menu, it should be possible to move between all visible menu items one by one, opening submenus as required. Instead, users have to tab through submenus that are closed:

menu-focus-management

The correct behavior would be:

  • When submenus aren't open, users shouldn't have to tab through their menu items.
  • Submenus can be opened by clicking, pressing Enter while focused; and closed with the Esc key or clicking outside
  • Opening a submenu, the focus now moves to the submenu and is trapped there until closed
  • Submenu triggers should use button tags instead of a, so screen readers announce the correct behavior (button instead of link), and browsers do not display a link target of "#" (see Add a "Dashboard" label for logo link in the main nav for screen reader users #5349).

Steps to Reproduce

  1. Go to the Wagtail admin
  2. Navigate with a keyboard through the menu items

Related: #5336

@thibaudcolas
Copy link
Member Author

Added a note that we should also change submenu triggers to be button elements instead of a, both so they announce correctly to screen reader users (these are not links), and so browsers do not show the link targets for no reason (#5349).

@thibaudcolas
Copy link
Member Author

Note: would be better to get #5254 in before starting work on this.

@thibaudcolas
Copy link
Member Author

Additional task from #5274:

Clarify that the user is focused on the side navigation by improving the voice-over command to say ‘Navigation’, for example: ‘link, Settings list navigation, 9 items

As part of this issue, I think it makes sense to implement correct labels for each of the submenus, as well as ARIA markup so they are announced as menus (aria-haspopup="dialog", etc).

@thibaudcolas thibaudcolas modified the milestones: some-day, real-soon-now Jul 26, 2019
@marteki
Copy link

marteki commented Jul 26, 2019

I'm working on this during Wagtail Sprint US 2019.

@thibaudcolas thibaudcolas moved this from To do to In progress in WCAG2.1 & ATAG 2.0 for CMS Jul 26, 2019
@marteki
Copy link

marteki commented Jul 27, 2019

@thibaudcolas I'm going to take the route of using aria-expanded="false" or aria-expanded="true" to show the submenus, since the standard ARIA menu markup is meant for application menus (and not so much for navigation lists on web pages).

@fabienheureux
Copy link
Member

fabienheureux commented Jul 14, 2020

@marteki is there an open PR for this issue ?
I wanted to work on it, following your approach, but if part of the work has already been done here it could be helpful 😉

@thibaudcolas thibaudcolas moved this from In progress to To do in WCAG2.1 & ATAG 2.0 for CMS Jul 15, 2020
@kaedroho kaedroho self-assigned this May 3, 2021
@thibaudcolas thibaudcolas self-assigned this Sep 30, 2021
@thibaudcolas thibaudcolas modified the milestones: real-soon-now, 2.16 Jan 14, 2022
@thibaudcolas thibaudcolas moved this from To do to In progress in WCAG2.1 & ATAG 2.0 for CMS Jan 14, 2022
@thibaudcolas thibaudcolas moved this from In progress to To review in WCAG2.1 & ATAG 2.0 for CMS Jan 14, 2022
WCAG2.1 & ATAG 2.0 for CMS automation moved this from To review to Done Jan 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants