Suggestion: Add focus-based trigger for Tooltips (e.g. tooltip-focus) #3796
Replies: 3 comments 1 reply
-
This is already focusable with keyboard:
https://play.tailwindcss.com/cVsGGtoYuh
|
Beta Was this translation helpful? Give feedback.
-
I was not clear enough I think. Forgive me for that. The behaviour I am thinking of is that the user would have to click the button to show the tooltip, and clicking anywhere else on the screen would make the tooltip hidden again. It's kind of like |
Beta Was this translation helpful? Give feedback.
-
If it's not showing with hover, I wouldn't call it Let me know if you have a question. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there 👋
Currently, DaisyUI tooltips are triggered only on hover, which is great for mouse users. However, for accessibility, better keyboard navigation and popup behaviour, it would be really helpful if tooltips could also be triggered on focus.
Suggestion:
Introduce a new class, such as
tooltip-focus
, which would behave liketooltip
but trigger the tooltip when the element receives focus (e.g., via keyboard tabbing). This would allow developers to use tooltips effectively in more interactive and accessible interfaces.Example Use Case:
This wouldn't interfere with the existing
tooltip
class and would give developers explicit control over the trigger behaviour.Beta Was this translation helpful? Give feedback.
All reactions