-
Hi 👋 we're looking to replace these icon / tooltip with Paste components. In the Tooltip docs, I see:
Noticing a few problems with the suggested approach:
To fix 1 & 2, is this an appropriate solution? If so, can this be added to the docs instead of the current example?
Still has problem 3, but we could probably live with that... Tangential question: By default it doesn't look like the background color of the Tooltip matches what I see in the docs? (Expect: color-background-body-inverse) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi @ghostling,
You can pass a color prop to icons to change their color.
The reason why we request adding tooltip icons inside a focuseable element is so that screen reader users can tab through the page and get the same content as mouse & sighted users. For more details on this subject, you can check out this article: https://inclusive-components.design/tooltips-toggletips/
You can pass
That's pretty clever. I'm not 100% sure on this approach. CC @SiTaggart again.
Are you on the latest version of Paste packages? |
Beta Was this translation helpful? Give feedback.
-
In terms of focusable divs or spans as the triggers of tooltips I would strongly recommend against it. When we refer to "focusable elements" we are talking about natively focusable HTML elements, and the reason being is that it communicates interactivity to users of assistive technology. A focusable div or span has no means of communicating it is interactive. With that in mind, if you're tooltip doesn't navigate anywhere I would suggest using a button as the trigger. Setting size and variant to reset should get you the same visual treatment.
This is very similar to the "Inclusive toggletips" section in the article that @TheSisb posted. To remove the title from the Icon, setting But that leads to the real underlying problem of how to deal with this "information tips" that are so highly used across console. The first thing to mention is that the ideal transition path from old to new might not actually be the direct translation of what we currently have in console. The Paste suggested treatment that hasn't been explored might be to not use a tooltip at all in this instance. It might actually be a better design to show the supplementary text directly underneath the item, rather than hide it away. The second thing to mention is that we don't yet have clear guidance on, if you absolutely must use an information tip, how to actually do that appropriately going forward. My hunch is, the suggestion I will make is to follow the "Inclusive toggletip" guide on that article https://inclusive-components.design/tooltips-toggletips/. This will mean we use a Popover, with a button surrounding the i icon. You click the i icon, the Popover shows. |
Beta Was this translation helpful? Give feedback.
Hi @ghostling,
You can pass a color prop to icons to change their color.
<Icon color="colorText" />
The reason why we request adding tooltip icons inside a focuseable element is so that screen reader users can tab through the page and get the same content as mouse & sighted users. For more details on this subject, you can check out this article: https://inclusive-components.design/tooltips-toggletips/