You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A few things surfaced during planning worth capturing.
Popover API
We'll use `popover="hint"` for rendering. Main benefit: top-layer placement means no z-index management needed, tooltips escape any overflow/stacking context issues in the consuming app, and Escape dismissal is handled by the browser natively.
The caveat: the CSS ecosystem around this isn't mature yet. Two pieces that would make the implementation fully declarative are not ready:
CSS Anchor Positioning (Chrome/Edge only) — would let us skip the `getBoundingClientRect()` positioning math entirely
Interest Invokers (proposal stage) — would let CSS drive hover/focus triggering without JS event listeners
Until those land cross-browser, we wire our own `mouseenter`/`mouseleave`/`focusin`/`focusout` listeners and compute placement via `getBoundingClientRect()` + CSS custom properties (same pattern as `useDraggable`). Not a problem, just more JS than we'd ideally write.
Configurable delay
Removed from scope. WCAG 1.4.13 requires tooltips to be persistent (not auto-hide on a timer), and a show delay creates more problems than it solves (flicker, missed interactions). We'll show immediately on hover/focus.
Viewport overflow / repositioning
Not in scope for the initial implementation. We'll pick a `placement` and render there. Auto-flipping when the tooltip would clip the viewport is a nice-to-have but adds meaningful complexity; can be tracked separately if needed.
Touch devices
No good solution exists. Hover doesn't apply, and focus activates interactive elements rather than showing tooltips. We'll document this as a known limitation — the component will work on touch via focus, but the experience is degraded. This is an industry-wide unsolved problem.
Content is always a string
Rich/interactive tooltip content is out of scope by design. If you need interactive content, use Dialog instead. This keeps the implementation simple and prevents misuse.
Pausing tooltip implementation — CSS Anchor Positioning and the Interest Invokers proposal are not yet cross-browser Baseline. Will revisit when both land in Baseline.
Activity
coloneljade commentedon Mar 14, 2026
Research notes (pre-implementation)
A few things surfaced during planning worth capturing.
Popover API
We'll use `popover="hint"` for rendering. Main benefit: top-layer placement means no z-index management needed, tooltips escape any overflow/stacking context issues in the consuming app, and Escape dismissal is handled by the browser natively.
The caveat: the CSS ecosystem around this isn't mature yet. Two pieces that would make the implementation fully declarative are not ready:
Until those land cross-browser, we wire our own `mouseenter`/`mouseleave`/`focusin`/`focusout` listeners and compute placement via `getBoundingClientRect()` + CSS custom properties (same pattern as `useDraggable`). Not a problem, just more JS than we'd ideally write.
Configurable delay
Removed from scope. WCAG 1.4.13 requires tooltips to be persistent (not auto-hide on a timer), and a show delay creates more problems than it solves (flicker, missed interactions). We'll show immediately on hover/focus.
Viewport overflow / repositioning
Not in scope for the initial implementation. We'll pick a `placement` and render there. Auto-flipping when the tooltip would clip the viewport is a nice-to-have but adds meaningful complexity; can be tracked separately if needed.
Touch devices
No good solution exists. Hover doesn't apply, and focus activates interactive elements rather than showing tooltips. We'll document this as a known limitation — the component will work on touch via focus, but the experience is degraded. This is an industry-wide unsolved problem.
Content is always a string
Rich/interactive tooltip content is out of scope by design. If you need interactive content, use Dialog instead. This keeps the implementation simple and prevents misuse.
coloneljade commentedon Mar 14, 2026
Pausing tooltip implementation — CSS Anchor Positioning and the Interest Invokers proposal are not yet cross-browser Baseline. Will revisit when both land in Baseline.
feat(tooltip): Tooltip component with CSS Anchor Positioning (#13) (#118