Skip to content
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, ToggleTip, Popover, Disclosure #9901

Closed
4 of 14 tasks
joshblack opened this issue Oct 19, 2021 · 0 comments
Closed
4 of 14 tasks

Tooltip, ToggleTip, Popover, Disclosure #9901

joshblack opened this issue Oct 19, 2021 · 0 comments
Assignees
Labels
package: react carbon-components-react planning: umbrella Umbrella issues, surfaced in Projects views type: enhancement 💡 version: 11 Issues pertaining to Carbon v11

Comments

@joshblack
Copy link
Contributor

joshblack commented Oct 19, 2021

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, an IconButton is to be used to render a button with a tooltip

ToggleTip

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 a button 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

  • Does the definition tooltip contain interactive descendants?
  • Is this something that role="term" and role="definition" could help us out with?

Tasks

Migration

These are the components we need to keep in mind when migrating

  • Tooltip (Interactive tooltip)
  • TooltipDefinition
  • TooltipIcon
@joshblack joshblack added package: react carbon-components-react version: 11 Issues pertaining to Carbon v11 type: enhancement 💡 labels Oct 19, 2021
@tay1orjones tay1orjones moved this to In Progress in Design System Nov 1, 2021
@tay1orjones tay1orjones mentioned this issue Nov 2, 2021
21 tasks
@tay1orjones tay1orjones added this to the v11 Beta 3 milestone Nov 2, 2021
@tay1orjones tay1orjones added the planning: umbrella Umbrella issues, surfaced in Projects views label Dec 10, 2021
@tay1orjones tay1orjones changed the title [Umbrella] Tooltip, ToggleTip, Popover, Disclosure Tooltip, ToggleTip, Popover, Disclosure Dec 10, 2021
Repository owner moved this from 🏗 In Progress to ✅ Done in Design System Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: react carbon-components-react planning: umbrella Umbrella issues, surfaced in Projects views type: enhancement 💡 version: 11 Issues pertaining to Carbon v11
Projects
Archived in project
Development

No branches or pull requests

3 participants