Upgrade a CSS tooltip with the behavior the platform can't express in styles
alone. The baseline needs no JavaScript: the stylesheet reveals the tip on
the trigger's :hover/:focus-visible and places it with CSS anchor
positioning. When this enhancer runs, it wires role="tooltip" and
aria-describedby, then takes over visibility (marking the trigger
data-hl-tooltip-managed) so it can add show/hide delays, a grace period for
crossing onto the tip, Escape-to-dismiss, and a JS positioning fallback on
engines without anchor positioning. Visibility is observable through
onOpenChange/hl:open-change and controllable through the returned API.
Upgrade a CSS tooltip with the behavior the platform can't express in styles alone. The baseline needs no JavaScript: the stylesheet reveals the tip on the trigger's
:hover/:focus-visibleand places it with CSS anchor positioning. When this enhancer runs, it wiresrole="tooltip"andaria-describedby, then takes over visibility (marking the triggerdata-hl-tooltip-managed) so it can add show/hide delays, a grace period for crossing onto the tip, Escape-to-dismiss, and a JS positioning fallback on engines without anchor positioning. Visibility is observable throughonOpenChange/hl:open-changeand controllable through the returned API.