Toggletips display and hide additional information upon the click of a UI trigger element and can contain interactive elements.
What Carbon provides
Carbon already incorporates accessibility into the toggletip component. Designers only need to indicate the toggletip’s content.
Toggletips use an information icon button for the trigger. These buttons are in
the tab order and are activated by pressing
Space. The activation
toggles the tip open and closed, and focus remains on the trigger.
When the toggletip contains interactive elements, pressing
Tab will move focus
to the first component in the toggletip. When the toggletip only has
non-interactive text, or when the focus is on the last component in the
Tab will close the toggletip and move focus to the next
tab stop on the page. Pressing
Esc also closes an open toggletip and returns
focus to the trigger if the focus is inside the tooltip.
Keep these considerations in mind if you are modifying Carbon or creating a custom component.
- The icon button has
- The button uses
aria-expandedto set toggletip visibility and
aria-controlsto handle navigation to the content.