Tooltip, ToggleTip, Popover, Disclosure #9901
Labels
package: react
carbon-components-react
planning: umbrella
Umbrella issues, surfaced in Projects views
type: enhancement 💡
version: 11
Issues pertaining to Carbon v11
Milestone
About
Usage
We're looking to update our tooltip component to no longer support interactive descendants. This functionality is moving into a separate component. Components like TooltipDefinition and TooltipIcon are being updated to use the new
Popover
component.Components
Popover
This component is used to render content above the current content on the page. In other words, this content renders on top of whatever is below the triggering element in the z-axis.
Tooltip
This component is used to add a tooltip to an interactive component.
IconButton
This component replaces the
TooltipIcon
component. In general, icons are unable to receive focus and therefore are not suitable for a tooltip. In most cases, a button is intended to be used as the icon performs some action. In these cases, anIconButton
is to be used to render a button with a tooltipToggleTip
This component replaces the interactive use-case of the
Tooltip
component. Specifically, tooltips may no longer have interactive descendants. As a result, this component allows users to have interactive descendants in popovers using a disclosure pattern. This component toggles the visibility of the popover by clicking on the trigger.Disclosure
This is a pattern used throughout the codebase that mirrors the WAI-ARIA Authoring Practices pattern for disclosure: https://w3c.github.io/aria-practices/#disclosure
This is provided through a hook called
useDisclosure
and can be applied to a trigger and element to be revealed.DefinitionTooltip
This component replaces
TooltipDefinition
. It is used in the flow of text in order to provide more details about a term. The challenge with this component is that there isn't a clear interactive element to be used for the trigger. Currently, we use abutton
where the label of the button is the term and the description of the button is the contents of the tooltip. However, this means that activating the button does nothing and could be confusing to the end-user.Questions
role="term"
androle="definition"
could help us out with?Tasks
IconButton
component and updateButton
to not have icon functionalityMigration
These are the components we need to keep in mind when migrating
The text was updated successfully, but these errors were encountered: