formaat-design / reshaped

Community repository for storing examples, reporting issues and tracking roadmap
https://reshaped.so
97 stars 3 forks source link

Tooltip on on non-button components? #182

Closed b-graves closed 8 months ago

b-graves commented 9 months ago

I would like to put a tooltip on a Skeleton, but I don't think this is possible? Is this correct?

blvdmitry commented 9 months ago

Hey, in order to keep it accessible, tooltips should have a focusable element linked to it. That way it will be accessible for keyboard users. What you can do is wrap a Skeleton with Actionable or with a tabIndex={0} div and pass Tooltip attributes in the render function to that element

b-graves commented 8 months ago

Apologies for the slow response. This makes a lot of sense thank you, I'm using the Actionable solution, thanks!