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>
text supplies plain text. Otherwise the default slot’s text content is used;
markup is not rendered as interactive tooltip content.anchor to an element, use for="id", or provide slot="anchor".placement supports top (default), bottom, left, or right. The shared
overlay controller flips and clamps it and follows scroll/resize.show-delay defaults to 400ms for hover; keyboard focus opens immediately.
hide-delay defaults to 100ms, allowing movement from anchor to tooltip.disabled suppresses the surface and its accessible description.show()/hide() provide imperative control, and open is read-only.
The toggle event reports { open }.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.