components icon indicating copy to clipboard operation
components copied to clipboard

[P1] Make tooltips keyboard-accessible and complete the rich-tooltip contract

Open Banegasn opened this issue 4 months ago • 1 comments

Objective

Make plain and rich tooltips discoverable by keyboard and assistive technology, interactive where appropriate, and consistent with their documented API.

Evidence

  • Focus/blur handlers are placed on a non-focusable wrapper and use non-bubbling events, so focusing a slotted trigger does not reliably show the tooltip.
  • The tooltip surface has no stable ID and the trigger receives no aria-describedby relationship.
  • Rich tooltip surfaces remain pointer-events:none, preventing hover persistence/interaction.
  • README documents a configurable delay, rich slots, and a different default placement; implementation hard-codes 500 ms and lacks those slots.

Scope

Use focusin/focusout or managed trigger listeners, add described-by linkage, configurable delays, rich slots/interaction, Escape dismissal, and viewport-aware placement. Define trigger ownership and cleanup.

Acceptance criteria

  • [ ] Hover and keyboard focus both show a plain tooltip.
  • [ ] Trigger computed accessible description includes tooltip text.
  • [ ] Escape dismisses without moving focus.
  • [ ] Rich content can be hovered/focused/interacted with without premature dismissal.
  • [ ] Delay/placement APIs match docs and respond to viewport edges.
  • [ ] Reconnect/disconnect leaves no timers/listeners/IDREF mutations behind.

Dependencies

Blocked by #5 and #6.

Autonomous execution contract

Use public APIs in tests and demos; do not reach into private _visible state.

Banegasn avatar Jul 13 '26 08:07 Banegasn

Toolchain and protected CI prerequisites are merged. This P1 tooltip work is now agent-ready. Use a canonical public contract only; do not retain legacy fallback behavior.

Banegasn avatar Jul 29 '26 10:07 Banegasn