You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[EuiToolTip] Tooltips on buttons persist after clicking #9520
Hovering over a button and then moving the mouse away makes the tooltip disappear. Clicking the button persists the tooltip until the user clicks something else.
This is because tooltips persist on elements that are in focus.
Tooltip persistence on focus is a desirable behavior for keyboard navigation, but it's often undesirable for mouse users. The user already knows what they just clicked, so after clicking the button, the tooltip should go away again on mouseout.
A possible way of implementing this is to persist tooltips if an element is :focus-visible and not just :focus.
@Zacqary If we do not persist the tooltip on button click then tooltips won't be discoverable at all on mobile devices. :focus-visible alone doesn't address this.
@elastic/accessibilitycontractors this behavior has been developed on purpose. There is an argument to be made here that it's better for accessibility that the tooltip persists when clicked (if it's simply hovered, on hover out it closes). Not only for keyboard navigation but also for mouse users (that e.g. have jitters) or for other forms of input (eye-tracking). Could you share any guidance here?
Is there a way we can not trigger tooltips when the application returns focus to an element? Showing tooltips should just happen on hover. Screen readers will read elements on focus regardless... @bhavyarm can you help us here?
I think @Zacqary solution of using :focus-visible seems like the best middle ground here.
I think the accessible fix is to make tooltip persistence modality-aware: persist when triggered by keyboard focus (:focus-visible / keyboard modality), but not when focus came from mouse click. Per APG, tooltips opened from hover should dismiss on mouseout, and tooltips opened from focus should dismiss on blur. That preserves keyboard access without leaving mouse-triggered tooltips stuck open.
My objection to that is that on a touchscreen, the user will never see the tooltip until they have already pressed the button. You have to interact with the thing — which you don't know what it does yet! – before you can find out what it does.
As far as I can find, best UX practices for touchscreen tooltips are to show them on a long-press. This is tricky to implement in Javascript as there's no native HTML touchevent for a touch-and-hold, but it's doable.
@ghudgins that is a different issue. Here, we are talking about tooltips showing on clicking the button. You are talking about tooltips showing on focus return. It may partially be solved by this one but focus return is programmatic focus that browsers don't handle consistently. Please refer to: #9549 I already have some ideas but I need to spike them out first.
My objection to that is that on a touchscreen, the user will never see the tooltip until they have already pressed the button. You have to interact with the thing — which you don't know what it does yet! – before you can find out what it does.
That's a fair point, probably the use of "discoverable" was poor on my part. I will try :focus-visible and if that works, we're set! (thanks for the suggestion btw)
I think the accessible fix is to make tooltip persistence modality-aware: persist when triggered by keyboard focus (:focus-visible / keyboard modality), but not when focus came from mouse click. Per APG, tooltips opened from hover should dismiss on mouseout, and tooltips opened from focus should dismiss on blur. That preserves keyboard access without leaving mouse-triggered tooltips stuck open.
@bhavyarm thank you for looking into this 🫶 That confirms the behavior, although originally intended for increased accessibility, is not required by the specs. cc @mgadewoll
Reacted by Lene Gadewoll, Graham Hudgins and Bhavya RM
changed the title [-][EuiTooltip] Tooltips on buttons persist after clicking[/-][+][EuiToolTip] Tooltips on buttons persist after clicking[/+]on Apr 9, 2026
Activity
weronikaolejniczak commentedon Mar 31, 2026
Hey @Zacqary 👋🏻 Thanks for raising this! We have a component sweep initiative for tooltips planned and we'll tackle it as part of that!
weronikaolejniczak commentedon Apr 1, 2026
@Zacqary If we do not persist the tooltip on button click then tooltips won't be discoverable at all on mobile devices.
:focus-visiblealone doesn't address this.@elastic/accessibilitycontractors this behavior has been developed on purpose. There is an argument to be made here that it's better for accessibility that the tooltip persists when clicked (if it's simply hovered, on hover out it closes). Not only for keyboard navigation but also for mouse users (that e.g. have jitters) or for other forms of input (eye-tracking). Could you share any guidance here?
ghudgins commentedon Apr 3, 2026
Is there a way we can not trigger tooltips when the application returns focus to an element? Showing tooltips should just happen on hover. Screen readers will read elements on focus regardless... @bhavyarm can you help us here?
bhavyarm commentedon Apr 6, 2026
I think @Zacqary solution of using :focus-visible seems like the best middle ground here.
I think the accessible fix is to make tooltip persistence modality-aware: persist when triggered by keyboard focus (:focus-visible / keyboard modality), but not when focus came from mouse click. Per APG, tooltips opened from hover should dismiss on mouseout, and tooltips opened from focus should dismiss on blur. That preserves keyboard access without leaving mouse-triggered tooltips stuck open.
Thanks!
Zacqary commentedon Apr 6, 2026
I understand the concern about mobile devices.
My objection to that is that on a touchscreen, the user will never see the tooltip until they have already pressed the button. You have to interact with the thing — which you don't know what it does yet! – before you can find out what it does.
As far as I can find, best UX practices for touchscreen tooltips are to show them on a long-press. This is tricky to implement in Javascript as there's no native HTML touchevent for a touch-and-hold, but it's doable.
weronikaolejniczak commentedon Apr 7, 2026
@ghudgins that is a different issue. Here, we are talking about tooltips showing on clicking the button. You are talking about tooltips showing on focus return. It may partially be solved by this one but focus return is programmatic focus that browsers don't handle consistently. Please refer to: #9549 I already have some ideas but I need to spike them out first.
That's a fair point, probably the use of "discoverable" was poor on my part. I will try
:focus-visibleand if that works, we're set! (thanks for the suggestion btw)@bhavyarm thank you for looking into this 🫶 That confirms the behavior, although originally intended for increased accessibility, is not required by the specs. cc @mgadewoll
[-][EuiTooltip] Tooltips on buttons persist after clicking[/-][+][EuiToolTip] Tooltips on buttons persist after clicking[/+]weronikaolejniczak commentedon May 4, 2026
@Zacqary The fix will be released this week in Kibana and Cloud UI. Thanks again for the discussion and the fantastic solution hint! 🙏🏻
weronikaolejniczak commentedon May 6, 2026
@Zacqary the issue has been addressed and the fix released on v115.0.0. The change will be added to Kibana by EOW.