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

NcActions doesn't work inside an element with a focus trap in a general case #4910

Closed
ShGKme opened this issue Dec 4, 2023 · 4 comments · Fixed by #4953
Closed

NcActions doesn't work inside an element with a focus trap in a general case #4910

ShGKme opened this issue Dec 4, 2023 · 4 comments · Fixed by #4953
Assignees
Labels
1. to develop Accepted and waiting to be taken care of a11y28checked accessibility Making sure we design for the widest range of people possible, including those who have disabilities

Comments

@ShGKme
Copy link
Contributor

ShGKme commented Dec 4, 2023

NcActions handles keydown on the menu element. It works only when a menu item has a focus.

Because NcActions renders in the body by default, when it's used in a component with a focus trap, the focus trap blocks the focus and breaks keyboard navigation.

In a specific case, it can be adjusted by setting container. But not in a general case.

The current idea — provide a container for mounting from an element with a focus trap (overlapping elements like Navigation, Sidebar, Modal), and not to mount in the body by default.

@ShGKme ShGKme added bug Something isn't working 1. to develop Accepted and waiting to be taken care of feature: actions Related to the actions components accessibility Making sure we design for the widest range of people possible, including those who have disabilities labels Dec 4, 2023
@ShGKme ShGKme self-assigned this Dec 4, 2023
@JuliaKirschenheuter JuliaKirschenheuter removed bug Something isn't working feature: actions Related to the actions components labels Dec 7, 2023
@JuliaKirschenheuter
Copy link
Contributor

JuliaKirschenheuter commented Jan 10, 2024

Example:

Screenshot from 2024-01-10 10-11-42

Screenshot from 2024-01-10 10-14-25

@JuliaKirschenheuter
Copy link
Contributor

Please pay attention on closing mechanism via esc: NcActions have to be "closable" via Esc and be independent of a context where they are rendered (one Esc should not close search contacts and NcActions in a same time).

Peek 2024-01-11 09-51

@szaimen
Copy link
Contributor

szaimen commented Feb 2, 2024

I tested this on stable28 and focus trap does not seem to work:

Aufzeichnung.2024-02-02.132624.mp4

@szaimen szaimen reopened this Feb 2, 2024
@JuliaKirschenheuter
Copy link
Contributor

Ok, server on stable28 still have an old "@nextcloud/vue": "^8.4.0" but needs v8.6.0. Moving to Parked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of a11y28checked accessibility Making sure we design for the widest range of people possible, including those who have disabilities
Projects
None yet
3 participants