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

[K7][UI Framework] Confusing focus highlight in contextmenu #14239

Closed
timroes opened this issue Oct 2, 2017 · 2 comments
Closed

[K7][UI Framework] Confusing focus highlight in contextmenu #14239

timroes opened this issue Oct 2, 2017 · 2 comments
Assignees
Labels
discuss Team:Platform-Design Team Label for Kibana Design Team. Support the Analyze group of plugins.

Comments

@timroes
Copy link
Contributor

timroes commented Oct 2, 2017

Currently when opening a K7 (and now backported to 6.x) contextmenu, the first item will receive focus automatically. Since we use a different highlight for hover effect as for focus effect, when hovering with the mouse over the menu, it looks as follows:

context-menu

I find this rather confusing, since the main focus still seems to be at the first item and not the hovered one.

I would suggest changing the behavior in one of the following ways:

  • When opening the contextmenu, don't focus any item by default, only start focusing, when you start using Up and Down. The whole dialog or the title, if existing, could be focused instead.
  • Detect whether we are opening the dialog via keyboard or via click, and just focus the first element if we are using a keyboard. But this behavior might be rather buggy, since e.g. a screen reader would usually trigger a click event, when using the screen reader "interaction" shortcut (e.g. VO + space in VoiceOver), and thus trigger the "wrong" behavior.
  • Don't show the focus highlight anymore, if we are hovering over the dialog (.dialog:not(:hover) .item:focus). This approach has the confusing behavior, that the item is actually still focused and pressing Enter at that moment, would still cause the item (that is now visually not focused anymore) to be triggered.

In general I would prefer the first suggestion the most, since I think it has the least drawbacks.

/cc @snide @cjcenizal

@timroes timroes added Team:Platform-Design Team Label for Kibana Design Team. Support the Analyze group of plugins. discuss labels Oct 2, 2017
@timroes timroes changed the title [K7][UI Framework] [K7][UI Framework] Confusing focus highlight in contextmenu Oct 2, 2017
@snide
Copy link
Contributor

snide commented Oct 2, 2017

I'm fine with the first solution.

@cjcenizal
Copy link
Contributor

I like the first solution too. I'll implement this. Thanks @timroes !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Team:Platform-Design Team Label for Kibana Design Team. Support the Analyze group of plugins.
Projects
None yet
Development

No branches or pull requests

3 participants