Carbon: Clicking on the Tooltip TriggerText doesn't open the tooltip

Created on 27 Jan 2020  ·  6Comments  ·  Source: carbon-design-system/carbon

What package(s) are you using?

  • [ ] carbon-components
  • [x] carbon-components-react

Detailed description

Describe in detail the issue you're having.
If I use the triggerText property to label a tooltip, clicking or tapping on the triggerText doesn't actually open the Tooltip

Is this issue related to a specific component?
Tooltip

What did you expect to happen? What happened instead? What would you like to
see changed?

I expected for the Tooltip to open when clicking on triggerText

What browser are you working in?

What version of the Carbon Design System are you using?

tooltip ux 🍿 bug 🐛 11

All 6 comments

not sure if this behavior is intentional, just want to double check with @carbon-design-system/design

@scottdickerson which tooltip are you using? I'm not sure I'm understanding the problem.

These variations allow you to click on the text as the trigger for the icon.
http://react.carbondesignsystem.com/?path=/story/tooltip--no-icon
http://react.carbondesignsystem.com/?path=/story/tooltipdefinition--default

Sorry @aagonzales its the Tooltip with Icon and triggerText

Can you explain the scenario around why it needs to work this way?

The tooltip is opening from the icon so I feel like keeping the trigger target exclusively on the icon seems more natural, versus clicking on the label and having a tooltip open elsewhere. If the label could trigger the tooltip then why have the icon? The label also could potentially have a different function that the tooltip icon, like this example from github. These are just my initial thoughts, I'm going to look into this more and see what some ux best practices are and I'll talk to the rest of the team about this as well.

Jan-27-2020 13-16-40

That makes sense I think the primary confusion was around the prop name “triggerText” I was assuming that the text would trigger the tooltip

seems like it was introduced in v7, and we can look into renaming the prop to reflect the current component behavior more accurately for v11

Was this page helpful?
0 / 5 - 0 ratings