ing-bank / lion

Fundamental white label web component features for your design system.

Home Page:https://lion-web.netlify.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[tooltip] What triggers the tooltip should also close it

erikkroes opened this issue · comments

When a user triggers a tooltip on focus, it can be closed by mouseout. When a user triggers a tooltip with mousein, it can be closed onblur.
This can be confusing and doesn't follow the Aria design pattern.
https://www.w3.org/TR/wai-aria-practices/#tooltip

Do I interpret that correctly: we should remember which action showed the tooltip and allow to hide it using only the opposite action and not any others? Can we then make a table with all cases: what is allowed to hide based on what triggered show?

Yes. This is how it's worded there:

If the tooltip is invoked when the trigger element receives focus, then it is dismissed when it no longer has focus (onBlur). If the tooltip is invoked with mouseIn, then it is dismissed with on mouseOut.