Tooltip

qds-tooltip supplies short, noninteractive text on pointer hover and keyboard focus. Interactive links, actions, or forms belong in qds-popover instead.

<qds-tooltip text="Download the current report" placement="top">
  <button type="button" slot="anchor">Download</button>
</qds-tooltip>

Content and anchors

Accessibility and dismissal

Focus stays on the anchor. Escape dismisses the tooltip and prevents immediate reopening until focus or hover leaves and re-enters. It stays visible while the pointer is on the tooltip or the anchor remains focused.

The visual surface has role="tooltip". A hidden text description is placed beside the anchor’s semantic focus target in the same DOM root so aria-describedby works across component boundaries. For an anchor with an open shadow root, the first enabled focus control receives the description (for example, a qds-button internal button). A focusable wrapper remains its own target. Existing description IDs are preserved and the generated node/reference is removed on disconnection. This description is available to assistive technology without waiting for a hover delay.

Native disabled buttons cannot receive focus. Wrap such a control in an appropriately labeled focusable element if its explanation must be reachable by keyboard; do not put essential instructions only in a tooltip.

Existing QDS surface, text, border and shadow tokens style the tooltip part in both themes. The surface has no animation and does not move focus. See the demo for text, keyboard, external anchors and disabled controls.