-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tooltip Component #8305
Comments
cc @carmacleod always curious to hear your thoughts on this stuff! |
Open questions:
It does seem like there are some roles we could see if we could make accessible: Coverage for these seems unknown: https://a11ysupport.io/tech/aria/term_role |
Hello. Do you have any sense of timeline for the reimplementation of tooltips & whether it would include support for portal-ing? ContextI've just started working on a task whose goal is to fix the usage of The core of this issue is that the wrapper node of our (version of) The only solution I can see for this is to use React portals. |
Hey @kubijo! 👋 This is definitely an enhancement we'd like to make for tooltips so that they can render outside of the current tree. Hopefully, it will make the cut for v11, but if not we will prioritize landing it because of how often this comes up 👍 |
Just FYI: For the time being, I've been able to make my own component thanks to react-popper-tooltip. It is admittedly much more naive and unconcerned with A11Y than what you surely need, but it might give you some entropy to work with & I will gladly go back to carbons native and remove an extra library dependency in my project. |
About
We would like to update our Tooltip components to better match design and development expectations. Currently, we see some usage of Tooltip that is completely appropriate for the component. In other areas, we might see Tooltips mistakenly be used. Often times this is when there is interactive content in a Tooltip.
As a result, we would like to limit the situations in which a Tooltip component can be used and augment the gaps with interactivity with the upcoming Popover and Disclosure components. For Tooltip, it should be used for annotating interactive elements with descriptive text.
In addition, it would be nice if this implementation supported a minimal version of "clip detection". This means that it should be aware of its boundary and will auto-update its position accordingly. This heuristic will be naive initially and will grow support over time.
Accessibility
In terms of accessibility, we will be referencing the following resources:
API Design
The Tooltip component will accept a single child. In addition, it will mutually accept a
label
prop anddescription
prop. Iflabel
is used, thenaria-labelledby
will be applied to the child. Ifdescription
is used,aria-describedby
will be applied to the child.Example
Output
By default, this component will render in-context and will not be rendered using a Portal. This will be an enhancement later, as needed.
Requirements
Remaining items
auto
alignment option to popover #10716Tooltip
with newToggletip
,Tooltip
,Popover
, etc. #10717The text was updated successfully, but these errors were encountered: