Tooltip investigation findings (2026-11-24)
aria-describedby → description (Task 4)
Original cases (plain span as referenced element)
Extended cases: custom element as referenced element (x-text with slotted light-DOM text)
Extended cases: custom element with text in shadow root (x-text-shadow)
DECISION (Task 4): DROP aria-label. Reason: Every hiding technique tested — clip, popover/display:none, plain display:none, and visibility:hidden+absolute — computes the accessible description in BOTH Chrome and Firefox via expect().toHaveAccessibleDescription() (Playwright AT bridge, accname-1.1 spec algorithm). This holds for native spans, custom elements with slotted light-DOM text, AND custom elements with text in the shadow root. The aria-describedby IDref traversal includes hidden referenced nodes per accname-1.1 Rule 2G; both browsers implement this correctly.
Layout footprint of a closed popover host (Task 2)
FOOTPRINT gap F1→F2 = 0 px. DECISION: closed popover host does not add footprint.
The popover="manual" attribute puts the element in display:none when closed, contributing zero width, zero height, and zero layout gap between adjacent siblings. Confirmed in both Chromium and Firefox. Additional measurement: closed <x-text popover="manual"> also reports width: 0, height: 0 in getBoundingClientRect().
Nested popovers (Task 2)
Inner shown while outer shown: yes. Inner survives outer hidden: yes.
Both Chromium and Firefox report:
NESTED both shown: true true— inner popover can be shown while nested inside an outer manual popover. No error thrown.NESTED inner after outer hidden: true— inner popover remains open (:popover-open) after the outer is hidden. The inner is in the top layer independently; hiding the outer does not cascade.
DECISION (Task 2 host hiding): PRIMARY: host popover=manual. Reason: Nesting is clean — an inner popover="manual" can be shown while DOM-nested inside an outer popover="manual", and hiding the outer does not cascade to the inner. The tooltip host can be popover="manual" (zero footprint) while the visible bubble is a separate inner popover, without interference.
Nesting <Tooltip> inside <button> (Task 1)
Deferred to Task 1 implementation (component-level positioning/focus check).
Summary of recommended hiding technique
The key finding for Task 4 and Task 2 combined: popover="manual" as the host-hiding technique is both footprint-free AND preserves the computed accessible description in Chromium and Firefox. The aria-describedby IDref points to the host element; even with display:none, the browser computes the description from its text content (whether slotted light DOM or shadow DOM text). Therefore:
- Host hiding:
popover="manual"(zero footprint, no layout impact, description still computed) - aria-label: not needed —
aria-describedbyalone is sufficient in both browsers - Shadow text vs slotted text: no difference in description computation; both work under every hiding technique tested
Verification method
All assertions were made using Playwright's expect(locator).toHaveAccessibleDescription(text) (Playwright 1.61 AT bridge, accname-1.1 spec algorithm). Chromium results were cross-checked via CDP Accessibility.getFullAXTree with identical results.