epam / UUI

React-based components and accelerators library built by EPAM Systems.
https://uui.epam.com/
MIT License
160 stars 61 forks source link

[Tooltip]: make tooltip accessible from keyboard #2322

Open AlekseyManetov opened 3 weeks ago

AlekseyManetov commented 3 weeks ago

To Do

According the W3C guidelines tooltip content should be displayed when tooltip target receives keyboard focus and should close by focus lose. See the example here

Describe the solution you'd like (optional)

Let's investigate how we can apply this logic for our Tooltip and components which can be used with it. We should decide how to make tooltip target component focusable, probably we should provide empty onClick handler in renderTarget params, but not all components which can be used with Tooltip can accept onClick and handle focus(e.g. IconContainer)