-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Update tooltip appearance #50539
Comments
I think we can go all black on the tooltip, potentially, but I wouldn't add a shadow. The text is legible, after all. A more urgent thing we need to fix, though, is that the tooltip appears to invoke simply on focus, making it linger when you just click the item: It should only ever appear if you hover and pause. @ciampo do you know if this is a regression? I believe it used to work. |
I think that one is worthy of a separate issue. I wonder if showing the tooltip on focus is an a11y requirement? Agree a black background would be a quick and easy fix. |
It looks like the tooltip is showing on the back button as a consequence of wrapping each sidebar "view" in the Re. the "tooltip lingering when clicking", that is a consequence of the behavior just described. Each sidebar "screen", in fact, has its own "back" button. When we click on such "Back" button, we trigger an animation, and a new screen is shown. Because of the behavior described above, the back button in the new screen receives focus and shows its tooltip. I can think of a few ways to improve the situation:
@andrewhayward, do you have any insights? |
The button receiving focus sounds perfectly fine to me, it needs to be transferred to a logical place so you can continue navigating. So to be absolutely clear, the focus behavior is not what I'm suggesting any changes to here. What I'm noting is that it feels unexpected to me that focus triggers the tooltip on the back button, when my mouse cursor is no-where near it. Showing tooltips on focus is also not something we consistently do across the UI, note the "Document Overview" example above, which does not show a tooltip on focus, only on hover. What makes the Back button unique in this sense? |
As far as I know, tooltips are always expected to show on both hover and focus events. With regards to the "Document Overview" button, I tested it on my local machine on the latest version of Gutenberg, and for me, the tooltip shows as expected both when focusing and hovering: tooltip-focus-document-outline.mp4 |
Just to confirm, at a general level, tooltips should definitely become visible on focus as well as hover, to ensure non-mouse users have access to the same information. And equally, focusing on the back button here is also to be expected. I think the confusing thing here is the combination of the two, because the user did not intend or expect to trigger the tooltip interaction. Moving focus to the button makes sense, showing a visible focus ring is questionable if the user didn't use a keyboard to get there, but enabling the tooltip is probably not the right action in this scenario. |
Thanks for all the feedback! So it sounds like hover and focus should both trigger the tooltip. The gotcha, and probably the solution here, is that the back button currently uses focus-visible to show the focus rectangle when keyboard navigating but not when clicking, which works rather well for handling the disorientation of the drilldown. But it seems like if focus and the tooltip are connected in that way, shouldn't the tooltip also be aware of the focus-visible behavior? That would give us the following:
|
The current I have the feeling that the best solution here could be to
I will have to chat to @andrewhayward to see if this is an option, or to see if we could make tweaks to |
Having thought about this quite a bit, the current situation is in a weird area between pure accessibility and UX. The behaviour as it is would ultimately be correct from an accessibility perspective, but I wouldn't want to say without research what sort of impact it has on UX. Given further work is ongoing, I wouldn't want to suggest changing the current experience, but investigation would certainly be useful to determine what's best for users. It may well be one of those things that isn't a problem at all, and we're only seeing because we're hyper-sensitive to the UI. |
I'm going to open a PR to address the issue described in the ticket. Since the conversation has diverged entirely from that issue, please feel free to edit the OP. |
Closing this as the original issue was resolved. Please feel free to open a new one to tackle the pesky "Back" tooltip. |
Tooltip background color is the same as the background in the site editor. It would be good to update the appearance so that they can be interpreted as discrete elements. Changing the background color, or adding a drop shadow are two options to explore.
The text was updated successfully, but these errors were encountered: