-
Notifications
You must be signed in to change notification settings - Fork 93
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
feat(NcActionInput): allow to prevent open on hover #5014
Conversation
Signed-off-by: Raimund Schlüßler <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's your feedback regarding accessibility @JuliaKirschenheuter @ShGKme? I would imagine the fix is good, but just to be sure. :)
I'd say that should be the default and the only behavior. It is especially not comfortable for people with mobility disabilities. A shaking hand, cerebral palsy or just a broken wrist. Or you a using a laptop in a car while driving on a bad road. Example scenario. User:
Also, changing focus on hover triggers more actions on the screen reader (it is pronounced). And it could be more complex cognitively. Example scenario. User:
Many things are pronounced. UI state changes just on hover. Focus moves unexpectedly (there was no interaction, no clicks, no keyboard). From my personal user perspective, I also don't see the benefits of focusing on input elements or opening selects/pickers on mouse move. This is not an expected behavior from my user experience. |
@ShGKme I agree with your analysis. But what is the conclusion? Should we remove focusing by mouse completely then? This is something the nextcloud-vue/src/components/NcActions/NcActions.vue Lines 1088 to 1110 in 2f0f4c4
Hovering over an action item, be it a button, input, link etc. focuses it, pressing enter then executes the action. |
From my PoV - yes, focusing any input elements should be removed. But we cannot just remove this method, because it is required to activate elements on hover... And we cannot remove |
This sounds like we should not focus the input, but should also not not focus the input 🙈 Btw. Keyboard navigation with |
Focus on keyboard navigation, not focus on mouse
Thanks for noticing, it should also be fixed... |
Superseded by #6475. |
☑️ Resolves
NcActionInput
on hover.While working on nextcloud/tasks#2427 I realized that opening the
NcSelect
inNcActionInput
on hover is quite disturbing, as it is unexpected and in many cases also undesired. E.g. when clicking aNcActionButton
below theNcActionInput
, the openNcActionInput
blocks the view. Also, the select is open by default if it is the first element in theNcActions
menu. This also looks weird. Furthermore, all other usages ofNcDateTimePicker
andNcSelect
do not open on hover.This PR adds a prop
openOnHover
that allows to disable this behaviour. By default it is still enabled to not introduce a breaking change.🖼️ Screenshots
🏚️ Before:
Bildschirmaufzeichnung.vom.2024-01-01.10-38-37.webm
🏡 After:
Bildschirmaufzeichnung.vom.2024-01-01.10-33-30.webm