Tooltip trigger is a sibling of the focusable element – recommended pattern? #9653
Unanswered
manisha18basra
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi team 👋
We’re currently using
useTooltipTriggeranduseTooltipTriggerStatefrom React Aria.We have a UI scenario where the focusable element is different from the element that visually triggers or anchors the tooltip. For example, imagine a hidden input (that receives focus) and a separate label or node next to it that should display the tooltip.
For example:
We’d like to know whether this is the recommended approach for such a pattern, or if there’s a more idiomatic way in React Aria to handle a focusable element and a separate tooltip trigger/anchor.
Current Implementation
Component Structure
Focus Tracking in Input Component
Questions
tooltipState.open()andtooltipState.close()the recommended approach for this scenario, or is there a better pattern?We’d really appreciate guidance on the intended pattern for this use case.
Thanks! 🙏
Environment:
"@react-aria/tooltip": "3.9.0""@react-stately/tooltip": "3.5.9""react": "^19.2.0"Beta Was this translation helpful? Give feedback.
All reactions