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

[BITV] Menus must be focus trapped #33743

Closed
3 tasks done
PVince81 opened this issue Aug 29, 2022 · 14 comments
Closed
3 tasks done

[BITV] Menus must be focus trapped #33743

PVince81 opened this issue Aug 29, 2022 · 14 comments
Assignees
Labels
4. to release Ready to be released and/or waiting for tests to finish accessibility bug
Milestone

Comments

@PVince81
Copy link
Member

PVince81 commented Aug 29, 2022

Tabbing out of a menu should close it.

Need to check all the menus in the top bar:

Also: probably the menu should close when Escape is hit while inside the menu ? (need to check if WCAG requires this)

@PVince81 PVince81 added bug 1. to develop Accepted and waiting to be taken care of accessibility labels Aug 29, 2022
@PVince81 PVince81 added this to the Nextcloud 25 milestone Aug 29, 2022
@blizzz blizzz modified the milestones: Nextcloud 25, Nextcloud 26 Oct 19, 2022
@Pytal Pytal self-assigned this Nov 10, 2022
@Pytal Pytal added 2. developing Work in progress and removed 1. to develop Accepted and waiting to be taken care of labels Nov 15, 2022
@Pytal
Copy link
Member

Pytal commented Nov 15, 2022

Notifications nextcloud/notifications#1367

@Pytal
Copy link
Member

Pytal commented Nov 17, 2022

@skjnldsv
Copy link
Member

I added focus trap on nextcloud-libraries/nextcloud-vue#3489 too to help with your ongoing accessibility work :)

@Pytal
Copy link
Member

Pytal commented Nov 21, 2022

Roger, so since they are mutually exclusive then which one should we go for @skjnldsv @PVince81?

@Pytal
Copy link
Member

Pytal commented Nov 23, 2022

Will go with focus trap version introduced in nextcloud-libraries/nextcloud-vue#3489 and will have to port over the existing menus as discussed with @PVince81

  • Port global search menu
  • Port notifications menu

@Pytal
Copy link
Member

Pytal commented Nov 24, 2022

@Pytal Pytal changed the title [BITV] Menus must close when leaving with keyboard navigation [BITV] Menus must be focus trapped Nov 24, 2022
@Pytal
Copy link
Member

Pytal commented Nov 24, 2022

  • Clarify with accessibility reviewer

@Pytal
Copy link
Member

Pytal commented Nov 29, 2022

@michaelnissenbaum for the top-right menus we have 2 options

  1. Allow tabbing out + automatically closing these menus and setting the focus on the next element in the page
  2. Trap focus within these menus so that tabbing after reaching the last item will loop back to the first menu item and allowing users to close these menus by hitting the Escape key

Which option would pass the accessibility audit?

Menu Screenshot
Global search image
Notifications image
Contacts image
User menu image

@michaelnissenbaum
Copy link

My favourite is the version one - tabbing out and auto closing. The second version is OK as well, but then keep in mind that after you leaved the dialog using ESC key the keyboard focus must be returned back to the element which was used to open it and has to be clearly visible. And there's always a possibility that users don't know that they can use ESC to close the dialog.

@Pytal
Copy link
Member

Pytal commented Dec 2, 2022

Thanks for your feedback @michaelnissenbaum!

After discussions with @PVince81 we've chosen go with option 2 as we have already been focus trapping many other UI elements and this will keep it consistent across the entire interface

@Pytal
Copy link
Member

Pytal commented Dec 7, 2022

Transferred "contacts menu"

@Pytal
Copy link
Member

Pytal commented Jan 18, 2023

Transferred "Port notifications menu"

@Pytal
Copy link
Member

Pytal commented Jan 18, 2023

Transferred "Port global search menu"

@Pytal
Copy link
Member

Pytal commented Jan 18, 2023

Transferred "user menu"

@Pytal Pytal added 4. to release Ready to be released and/or waiting for tests to finish and removed 2. developing Work in progress labels Jan 18, 2023
@Pytal Pytal closed this as completed Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish accessibility bug
Projects
None yet
Development

No branches or pull requests

6 participants