v0.1.0-alpha.15
Three Tooltip fixes. The component's docblock cites WCAG 2.1 SC 1.4.13; it now satisfies all three parts of that criterion, and it stays with its trigger when the page scrolls.
Fixed
Escape dismisses the tooltip (#26). Nothing did before, so a tooltip opened by hover could only be closed by moving the pointer off the trigger, even when it covered the thing being read. The listener is on the document, because a hover-opened tooltip leaves focus wherever it was.
The pointer can reach the content (#26). Leaving the trigger hid the tooltip at once. The content sits 8px away, so crossing to it put the pointer over the body in between, which closed it before it arrived: anything longer than a glance, or that a reader wanted to select, was unreachable. The hide is now deferred by 120ms, which covers the crossing.
The content takes pointer events (#26). .tooltip__content carried pointer-events: none, which made the previous fix meaningless in a browser: the element was never the target of a pointer event, so arriving on it fired nothing and selecting the text was impossible. Every behaviour test passed with it in place, because jsdom does not implement the property, so a stylesheet guard covers it now.
The tooltip stays anchored to its trigger (#27). Placement was measured once, when the tooltip opened. The content is position: fixed in a portal, so scrolling with the pointer or focus still on the trigger left the tooltip where the trigger had been, describing whatever scrolled into that spot; a resize left it off the edge. It re-measures on scroll and on resize now, listening in the capture phase since a scroll inside a container does not bubble.
All four were found while continuum-hub adopted this component in place of its own glossary tooltip, which handled Escape and tracked scrolling.
Before you upgrade
A patch. No API change, and nothing is laid out differently.
Two behaviours a consumer may notice: leaving the trigger now hides the tooltip 120ms later rather than instantly, and an open tooltip can take a pointer event that previously passed through to whatever sits under it.
Full changelog: v0.1.0-alpha.14...v0.1.0-alpha.15