Skip to content

fix(Text, Heading): the truncation tooltip adds no description, so the cut text is read once - #12653

Merged
cixzhang merged 7 commits into
mainfrom
lane4/truncation-tooltip-undescribed
Nov 22, 2026
Merged

cixzhang merged 7 commits into
mainfrom
lane4/truncation-tooltip-undescribed

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

User impact

People using a screen reader hear a truncated Text or Heading once. Its truncation tooltip shows the element's own full text. Once that tooltip had mounted (after the first hover, tap or focus), Tooltip also set the element's aria-describedby to it, so the same text was read as the name and again as the description.

Button and TableHeaderCell cut-text tooltips were already undescribed and stay so. Every other tooltip still describes its anchor.

Change

  • Text/TruncationTooltip.tsx: the truncation tooltip of Text, Heading and Lab's LineClamp renders UndescribedTooltip, the internal tooltip that Button's cut label and TableHeaderCell already use, in place of the public Tooltip. It attaches its triggers to the element and sets no aria-describedby, before or after it mounts.
  • Tooltip/Tooltip.tsx: UndescribedTooltip takes an optional placement and isOpen, and onHide becomes optional. Without isOpen, hover, tap and focus open it, as they open a Tooltip, through useTooltip, which reads the interaction that mounted it. It is still not exported from any package entry.
  • Text/cutTextOnKeyboardFocus.tsx: the keyboard-focus tooltip that Button's cut label and TableHeaderCell's cut heading use passes isOpen to it, so they behave as before.
  • The public Tooltip and tooltipPresentInterest.ts are unchanged. Every Tooltip anchor still gains the tooltip id (component:Tooltip FR2, AR1).
  • component:Text AR2 and component:Heading AR3: the truncation tooltip adds no description, because its text is already the element's own content. The Compatibility rows and the verification rows follow: a tooltip description at any time fails. component:Text lists the internal tooltip with the truncation it owns.
  • Changeset: [fix], @astryxdesign/core patch.

No public prop, export or hidden description node changes.

Testing

  • Text.test.tsx:
    • After the first hover mounts and opens the tooltip, the element has no aria-describedby. Before, the case expected the tooltip's id.
    • A hover and then a keyboard focus add no description to the Text or its link, after the tooltip has shown.
    • Keyboard focus inside the clamped text mounts it with no description on the link or the Text.
    • These fail on main.
  • Heading.test.tsx: after the first hover, the heading has no aria-describedby. This fails on main.
  • Button.truncationTooltip.test.tsx and TableHeaderCell.truncationTooltip.test.tsx already assert no description after the tooltip shows, and still pass.
  • The Text, Heading, Tooltip, Button, TableHeaderCell, SideNav and Lab LineClamp suites pass (31 files, 1,192 tests). tsc, ESLint, pnpm check:knowledge and pnpm check:changesets pass.
  • First-load gzip on the four reference pages at 261c87e, as the automated review measured it: docs +17 B, form +8 B, menu +10 B, table +16 B.
  • Preflight with scoped browser specs on a Linux node: review:pre, build, typecheck, lint, vitest ui, knowledge and changesets pass; browser interaction specs pass 35/35 and accessibility specs 89/89. In vitest node, only offline-media.test.mjs's two proxy-bound cases and main's since-fixed packed CLI cache test fail there.

Overlap checked: #11916, #11830 (separate changes: #11916 changes how a tooltip describes its trigger and also edits UndescribedTooltip and the Text truncation test, so whichever merges second merges main and keeps both edits; #11830 changes how single-line truncation breaks words, shares the Text and Heading records and tests, and merges cleanly with this change)

Writing rubric results

  • R1 narration: none; AR2 and AR3 state what the tooltip does.
  • R2 research: none.
  • R3 evidence: the verification rows name failing states, not a change.
  • R4 rejected alternatives: none.
  • R5 change references: none.
  • R6 open questions: none.
  • R7 project status: none.

…e cut text is read once

Once the truncation tooltip mounted, Tooltip set aria-describedby on the
element to a tooltip whose text is the element's own, so a screen reader
read it twice. TruncationTooltip now provides TooltipDescribesContext as
false, and Tooltip's anchor mode then sets no description. Other
tooltips still describe their anchor. The Text and Heading records state
that the truncation tooltip adds no description.
@vercel

vercel Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 22, 2026 7:14pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 18, 2026
@astracat-bot

astracat-bot Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 22, 2026, 7:56 PM UTC

@cixzhang cixzhang added the lane:4 Astryx fix-loop lane 4 owns this label Nov 18, 2026
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 18, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 7e73934

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 18, 2026
@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 261c87e

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
lab/Comments 390.7 kB (+20 B) · 2.5 kB CSS (0) — — · — · —
Text · Storybook 11.7 kB (+19 B) · 5.8 kB CSS (0) 1,016 (+3) ✓ · ✓ · —
lab/CommentComposer 187.0 kB (+19 B) · 1.9 kB CSS (0) — — · — · —
114 more components
Component Size LoC Visual · A11y · RTL
PowerSearch 320.5 kB (+18 B) · 27.3 kB CSS (0) — — · — · —
lab/AudioPlayer 239.2 kB (+18 B) · 1.8 kB CSS (0) — — · — · —
charts/ChartTooltip 228.5 kB (+16 B) · 451 B CSS (0) — — · — · —
lab/MediaCaptionsButton 229.4 kB (+16 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaPlaybackRate 229.4 kB (+16 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaPlayButton 229.4 kB (+16 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaSeekButton 229.4 kB (+16 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaTimeSlider 229.4 kB (+16 B) · 1.5 kB CSS (0) — — · — · —
Selector 121.5 kB (+15 B) · 19.7 kB CSS (0) — — · — · —
lab/MediaFullscreenButton 229.4 kB (+15 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaTime 229.4 kB (+15 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaVolume 229.4 kB (+15 B) · 1.5 kB CSS (0) — — · — · —
lab/TransferList 140.0 kB (+15 B) · 1.2 kB CSS (0) — — · — · —
Markdown 210.8 kB (+14 B) · 23.5 kB CSS (0) — — · — · —
lab/CommentThread 383.7 kB (+14 B) · 2.4 kB CSS (0) — — · — · —
lab/TransferListSelector 151.9 kB (+14 B) · 1.4 kB CSS (0) — — · — · —
richtext/RichTextEditorToolbar 316.9 kB (+14 B) · 454 B CSS (0) — — · — · —
Link 58.2 kB (+13 B) · 7.4 kB CSS (0) — — · — · —
Pagination 154.8 kB (+13 B) · 20.1 kB CSS (0) — — · — · —
Tokenizer 113.1 kB (+13 B) · 21.9 kB CSS (0) — — · — · —
lab/ChatReactionBar 130.4 kB (+13 B) · 1.1 kB CSS (0) — — · — · —
lab/TourStep 97.3 kB (+13 B) · 691 B CSS (0) — — · — · —
Button 67.9 kB (+12 B) · 11.2 kB CSS (0) — — · — · —
Carousel 78.2 kB (+12 B) · 12.1 kB CSS (0) — — · — · —
DateInput 209.8 kB (+12 B) · 19.0 kB CSS (0) — — · — · —
Lightbox 151.6 kB (+12 B) · 12.3 kB CSS (0) — — · — · —
Thumbnail 72.3 kB (+12 B) · 12.7 kB CSS (0) — — · — · —
lab/Schedule 119.2 kB (+12 B) · 3.9 kB CSS (0) — — · — · —
lab/VideoPlayer 236.7 kB (+12 B) · 2.1 kB CSS (0) — — · — · —
richtext/RichTextEditor 311.2 kB (+12 B) · 2.7 kB CSS (0) — — · — · —
charts/Chart 252.1 kB (+11 B) · 516 B CSS (0) — — · — · —
CommandPaletteInput 34.3 kB (+11 B) · 7.9 kB CSS (0) — — · — · —
DateRangeInput 106.7 kB (+11 B) · 14.2 kB CSS (0) — — · — · —
DropdownMenu 133.2 kB (+11 B) · 19.8 kB CSS (0) — — · — · —
DropdownMenuSubMenu 80.9 kB (+11 B) · 11.0 kB CSS (0) — — · — · —
MultiSelector 109.8 kB (+11 B) · 18.9 kB CSS (0) — — · — · —
Table 126.2 kB (+11 B) · 21.2 kB CSS (0) — — · — · —
TimeInput 182.3 kB (+11 B) · 17.9 kB CSS (0) — — · — · —
richtext/RichTextView 287.9 kB (+11 B) · 2.4 kB CSS (0) — — · — · —
ChatLayoutScrollButton 68.5 kB (+10 B) · 11.4 kB CSS (0) — — · — · —
ChatMessageList 28.7 kB (+10 B) · 7.4 kB CSS (0) — — · — · —
CheckboxList 75.8 kB (+10 B) · 8.2 kB CSS (0) — — · — · —
DateTimeInput 234.0 kB (+10 B) · 20.7 kB CSS (0) — — · — · —
Slider 117.3 kB (+10 B) · 9.3 kB CSS (0) — — · — · —
Spinner 25.3 kB (+10 B) · 6.6 kB CSS (0) — — · — · —
Timestamp 28.0 kB (+10 B) · 11.4 kB CSS (0) — — · — · —
Toast 107.7 kB (+10 B) · 11.5 kB CSS (0) — — · — · —
TopNav 71.4 kB (+10 B) · 12.1 kB CSS (0) — — · — · —
lab/DialogHeroHeader 92.5 kB (+10 B) · 372 B CSS (0) — — · — · —
charts/ChartLegend 42.2 kB (+9 B) · 224 B CSS (0) — — · — · —
AlertDialog 134.5 kB (+9 B) · 16.3 kB CSS (0) — — · — · —
Calendar 79.1 kB (+9 B) · 11.8 kB CSS (0) — — · — · —
ChatDictationButton 68.5 kB (+9 B) · 11.2 kB CSS (0) — — · — · —
ChatLayout 91.6 kB (+9 B) · 11.7 kB CSS (0) — — · — · —
ChatSendButton 68.3 kB (+9 B) · 11.2 kB CSS (0) — — · — · —
ChatToolCalls 33.1 kB (+9 B) · 8.8 kB CSS (0) — — · — · —
CodeBlock 84.0 kB (+9 B) · 12.9 kB CSS (0) — — · — · —
ComplexSelector 84.1 kB (+9 B) · 13.3 kB CSS (0) — — · — · —
ContextMenu 106.7 kB (+9 B) · 19.6 kB CSS (0) — — · — · —
DialogHeader 71.2 kB (+9 B) · 12.9 kB CSS (0) — — · — · —
DrawerHeader 71.3 kB (+9 B) · 14.3 kB CSS (0) — — · — · —
SideNavHeading 88.7 kB (+9 B) · 12.5 kB CSS (0) — — · — · —
Stepper 69.6 kB (+9 B) · 11.3 kB CSS (0) — — · — · —
TableCell 107.9 kB (+9 B) · 20.2 kB CSS (0) — — · — · —
TextArea 95.4 kB (+9 B) · 10.0 kB CSS (0) — — · — · —
ToggleButton 95.2 kB (+9 B) · 11.3 kB CSS (0) — — · — · —
TopNavHeading 88.3 kB (+9 B) · 12.4 kB CSS (0) — — · — · —
lab/EmojiPicker 121.3 kB (+9 B) · 751 B CSS (0) — — · — · —
AppShell 92.2 kB (+8 B) · 14.9 kB CSS (0) — — · — · —
Banner 70.0 kB (+8 B) · 11.7 kB CSS (0) — — · — · —
CheckboxInput 71.7 kB (+8 B) · 10.7 kB CSS (0) — — · — · —
CommandPalette 84.0 kB (+8 B) · 13.5 kB CSS (0) — — · — · —
FileInput 77.8 kB (+8 B) · 12.9 kB CSS (0) — — · — · —
IconButton 67.9 kB (+8 B) · 11.2 kB CSS (0) — — · — · —
MoreMenu 133.5 kB (+8 B) · 19.8 kB CSS (0) — — · — · —
Popover 105.7 kB (+8 B) · 15.5 kB CSS (0) — — · — · —
RadioList 63.2 kB (+8 B) · 7.7 kB CSS (0) — — · — · —
SideNavCollapseButton 68.8 kB (+8 B) · 11.2 kB CSS (0) — — · — · —
SideNavItem 82.9 kB (+8 B) · 12.3 kB CSS (0) — — · — · —
Switch 111.9 kB (+8 B) · 10.5 kB CSS (0) — — · — · —
lab/ListInput 97.6 kB (+8 B) · 922 B CSS (0) — — · — · —
lab/TabBarMoreList 105.2 kB (+8 B) · 1.8 kB CSS (0) — — · — · —
ChatComposer 91.0 kB (+7 B) · 13.5 kB CSS (0) — — · — · —
Heading 12.5 kB (+7 B) · 5.8 kB CSS (0) — — · — · —
TableSelectionToolbar 78.4 kB (+7 B) · 14.6 kB CSS (0) — — · — · —
Timer 14.1 kB (+7 B) · 6.4 kB CSS (0) — — · — · —
lab/DiffViewer 95.9 kB (+7 B) · 2.1 kB CSS (0) — — · — · —
lab/LineClamp 14.2 kB (+7 B) · 168 B CSS (0) — — · — · —
BaseTypeahead 84.4 kB (+6 B) · 12.1 kB CSS (0) — — · — · —
MobileNavToggle 69.6 kB (+6 B) · 11.8 kB CSS (0) — — · — · —
NavHeadingMenuItem 17.1 kB (+6 B) · 6.7 kB CSS (0) — — · — · —
TableHeaderCell 107.8 kB (+6 B) · 20.0 kB CSS (0) — — · — · —
TabMenu 84.8 kB (+6 B) · 12.3 kB CSS (0) — — · — · —
TextInput 101.7 kB (+6 B) · 12.9 kB CSS (0) — — · — · —
ChatComposerInput 88.1 kB (+5 B) · 12.5 kB CSS (0) — — · — · —
ChatComposerTokenElement 88.1 kB (+5 B) · 12.5 kB CSS (0) — — · — · —
CheckboxListItem 82.7 kB (+5 B) · 12.6 kB CSS (0) — — · — · —
Field 61.7 kB (+5 B) · 7.7 kB CSS (0) — — · — · —
InputGroup 63.9 kB (+5 B) · 8.9 kB CSS (0) — — · — · —
ListItem 81.9 kB (+5 B) · 12.6 kB CSS (0) — — · — · —
MobileNav 80.3 kB (+5 B) · 11.8 kB CSS (0) — — · — · —
RadioListItem 78.8 kB (+5 B) · 11.2 kB CSS (0) — — · — · —
SideNav 116.3 kB (+5 B) · 12.6 kB CSS (0) — — · — · —
TopNavMenu 87.8 kB (+5 B) · 12.4 kB CSS (0) — — · — · —
Typeahead 95.2 kB (+5 B) · 14.4 kB CSS (0) — — · — · —
lab/ChatEmojiPicker 129.2 kB (+5 B) · 773 B CSS (0) — — · — · —
BreadcrumbItem 103.0 kB (+4 B) · 14.0 kB CSS (0) — — · — · —
NumberInput 106.7 kB (+4 B) · 13.1 kB CSS (0) — — · — · —
TopNavMegaMenu 82.2 kB (+4 B) · 13.1 kB CSS (0) — — · — · —
lab/SelectableCardGroup 72.1 kB (+4 B) · 162 B CSS (0) — — · — · —
ProgressBar 12.5 kB (0) · 6.7 kB CSS (0) — — · — · —
StatusDot 34.8 kB (0) · 5.7 kB CSS (0) — — · — · —
Tooltip · Storybook 33.1 kB (0) · 4.8 kB CSS (0) 925 (+4) ✓ · ✓ · ✓
lab/CommentPin 61.8 kB (0) · 1.2 kB CSS (0) — — · — · —

Package size: @astryxdesign/core 8.00 MB packed (+277 B); no new dependencies.

Touched components checked; for the full suites, add ci:run-visual for Visual, ci:run-rtl for RTL.

Accessibility: 2 violation(s)

Accessibility Audit

Status: 2 accessibility violation(s) found — 2 serious.

Text - 1 issue(s)
  • 🟠 serious: Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
    • Rule: color-contrast · Affects 1/24 stories · Learn more
    • WCAG: 1.4.3 (Level AA)
Tooltip - 1 issue(s)
  • 🟠 serious: Ensure elements that have scrollable content are accessible by keyboard in Safari
    • Rule: scrollable-region-focusable · Affects 1/28 stories · Learn more
    • WCAG: 2.1.1, 2.1.3 (Level A)

Generated by PR Enrichment workflow | View full report

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested. The fix works (a truncated Text or Heading no longer names its own tooltip in aria-describedby, so its text is exposed once), but two things need fixing first:

  • Tooltip.tsx:256-260 skips aria-describedby for an anchorRef trigger when TooltipDescribesContext is false, but component:Tooltip FR2, AR1 and AR5 still say every anchorRef trigger gains the tooltip id, and its review checks reject a lost aria-describedby link; amend that record to name the truncation-tooltip exception, or build the truncation tooltip on useTooltip so Tooltip itself stays unchanged.
  • The description's overlap note is wrong: #11916 does not add TooltipDescribesContext or touch tooltipPresentInterest.ts, and #12285 merges cleanly with main, so please correct that paragraph.

Amending the Tooltip record is a new commit, so it needs a fresh /approve-spec for that head, and CI has not run on this draft head yet.

Claims and files checked

Review mode: same-head; reason: none

Claims:

  • Changeset: a truncated Text or Heading is announced once, its truncation tooltip no longer adds a description, and other tooltips still describe their anchor: verified (TruncationTooltip.tsx:199-206, Tooltip.tsx:256-260, context default true at tooltipPresentInterest.ts:52-56; Text.test.tsx:538 and :670, Heading.test.tsx:506).
  • Before the change, the mounted tooltip set the element's description to its own text: verified (base anchor wiring; a hover in Chromium leaves aria-describedby on the span and the heading).
  • Button and TableHeaderCell cut-text tooltips stay undescribed: verified (UndescribedTooltip is unchanged; their truncation suites pass).
  • The new context is internal, defaults to true and no package entry exports it: verified.
  • Anchor mode with the context false attaches the triggers and sets no description: verified (Tooltip.tsx:255-260).
  • The Text and Heading records state that the truncation tooltip adds no description, and their compatibility and verification rows follow: verified.
  • The changeset is a Core patch fix: verified.
  • No public prop, export or hidden description node changes: verified (no API rows for Core or the seven themes).
  • The new Text and Heading assertions fail on main: verified (all three fail on the base and pass on the head).
  • The Button and TableHeaderCell truncation tests still pass: verified.
  • The listed suites, typecheck, ESLint and the knowledge and changeset checks pass: verified for the focused suites, typecheck, lint on the changed files and both checks; the stated test total was not reproduced.
  • #11916 adds the same context to the same file: false.
  • #12285 shares the Text record and already conflicts with main: it shares the record, but merges cleanly, so false.
  • #11830 shares the records and tests and merges cleanly with this change: verified.
  • The records add no narration or project status: verified.

Files:

  • .changeset/truncation-tooltip-undescribed.md: clear.
  • docs/specs/components/Heading/Heading.spec.md: clear.
  • docs/specs/components/Text/Text.spec.md: clear.
  • packages/core/src/Heading/Heading.test.tsx: clear.
  • packages/core/src/Text/Text.test.tsx: clear.
  • packages/core/src/Text/TruncationTooltip.tsx: clear.
  • packages/core/src/Tooltip/Tooltip.tsx: contradicts the unamended Tooltip record (first finding above).
  • packages/core/src/Tooltip/tooltipPresentInterest.ts: clear.

Automated review (maintainer link)

Comment thread packages/core/src/Tooltip/Tooltip.tsx Resolved
…d tooltip, so the public Tooltip stays unchanged

Replaces the TooltipDescribesContext route: the public Tooltip's anchorRef
path and tooltipPresentInterest.ts are main's again, so every Tooltip
anchor still gains the tooltip id (component:Tooltip FR2, AR1).

- TruncationTooltip renders UndescribedTooltip, the internal tooltip that
  Button's cut label and TableHeaderCell use. It adds no aria-describedby,
  before or after it mounts.
- UndescribedTooltip takes an optional placement and isOpen. Without isOpen,
  hover, tap and focus open it, as they open a Tooltip; Button and
  TableHeaderCell pass isOpen.
- Text.test: a hover and then a keyboard focus add no description.
- component:Text owns the internal tooltip (AR2) and names the new case.
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 21, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec bbd7c61

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 21, 2026

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: the required checks started on this head when it left draft and are still running, so merging waits for them to pass.

A truncated Text or Heading now exposes its full text once: after the first hover, the base gives the element an accessible description equal to its own text, and this head gives none while the tooltip still opens with the same text. The public Tooltip still describes its anchor, and the Text and Heading record changes are approved for this head. Nothing else is needed from you.

Claims and files checked

Review mode: same-head; reason: none

Claims:

  • Changeset: a truncated Text or Heading is read once because its tooltip no longer adds its text again as a description: verified (TruncationTooltip.tsx:190-198; Text.test.tsx:561, :585, :737 and Heading.test.tsx:527 fail on the base and pass here; a Chromium accessibility-tree read after a hover shows the base description and none here).
  • Changeset: other tooltips still describe their anchor: verified (Tooltip.tsx:250-268 and :320-332 are unchanged and the Tooltip suites pass).
  • Changeset: a Core patch fix: verified ([fix], @astryxdesign/core patch; the changeset check passes).
  • Before this change, the mounted tooltip described the element with its own text: verified (base accessibility tree; the red-first tests).
  • Button and TableHeaderCell cut-text tooltips were already undescribed and stay so: verified (Button.truncationTooltip.test.tsx:154, TableHeaderCell.truncationTooltip.test.tsx:193 and :199 pass).
  • The truncation tooltip of Text, Heading and Lab's LineClamp renders the internal undescribed tooltip, which attaches its triggers and sets no description before or after it mounts: verified (TruncationTooltip.tsx:190-198, Tooltip.tsx:397-412).
  • The undescribed tooltip takes an optional placement and open state, and its hide callback becomes optional; without an open state, hover, tap and focus open it through useTooltip, which reads the interaction that mounted it: verified (Tooltip.tsx:384-397; useTooltip.tsx:829-851).
  • It is still not exported from any package entry: verified (Tooltip/index.ts:13-23; no public API rows).
  • Button and TableHeaderCell pass isOpen and behave as before: verified (Button.tsx:1240, TableHeaderCell.tsx:238).
  • The public Tooltip and the present-interest module are unchanged, and every Tooltip anchor still gains the tooltip id: verified (neither is in the diff; useTooltip.tsx and tooltipPresentInterest.ts are identical on base and head).
  • The Text and Heading records say the truncation tooltip adds no description, the compatibility and verification rows follow, and the Text record lists the internal tooltip: verified (Text.spec.md:86, :167, :209; Heading.spec.md:159, :199).
  • No public prop, export or hidden description node changes: verified (no API rows for Core or the seven themes).
  • The new and changed Text and Heading assertions fail on main: verified against the base (four failures).
  • The listed suites pass: verified in substance (a 34-file run covering those suites passes 1,727 tests; the exact 31-file, 1,192-test set was not reproduced).
  • Typecheck, ESLint and the knowledge and changeset checks pass: verified (local runs; the Lint workflow and the typecheck job pass in CI at this head).
  • First-load gzip on the four reference pages is docs +10 B, form +6 B, menu +7 B and table +15 B: verified (base and head builds of each page).
  • The preflight run: verified where reproducible (build, typecheck, lint, UI tests, knowledge and changesets as above; CI's interaction-spec and accessibility-contract jobs pass at this head; the packed CLI cache test fix landed on main after this base); one node-test shard and one UI-test shard were still running at this review.
  • #11916 changes how a tooltip describes its trigger and also edits the undescribed tooltip and the Text truncation test, so the second to merge must merge main: verified (a trial merge with its current head conflicts in exactly those two files).
  • #11830 shares the records and tests and merges cleanly with this change: verified (trial merge clean).
  • Writing rubric: the records add no narration, research, project status or open questions: verified.

Files:

  • .changeset/truncation-tooltip-undescribed.md: clear.
  • docs/specs/components/Heading/Heading.spec.md: clear.
  • docs/specs/components/Text/Text.spec.md: clear.
  • packages/core/src/Button/Button.tsx: clear.
  • packages/core/src/Heading/Heading.test.tsx: clear.
  • packages/core/src/Table/TableHeaderCell.tsx: clear.
  • packages/core/src/Text/Text.test.tsx: clear.
  • packages/core/src/Text/TruncationTooltip.tsx: clear.
  • packages/core/src/Tooltip/Tooltip.tsx: clear.

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as ready for review November 21, 2026 01:56
@cixzhang
cixzhang marked this pull request as draft November 21, 2026 02:26
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 9a94b3a

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: the required checks started on this head when it left draft and are still running, so merging waits for them to pass.

A truncated Text or Heading now exposes its full text once: after the first hover, the base gives the element an accessible description equal to its own text, and this change gives none while the tooltip still opens with the same text. The public Tooltip still describes its anchor, and the Text and Heading record changes are approved for this head. The merge of main leaves this pull request's own changes untouched. Nothing else is needed from you.

Claims and files checked

Review mode: carry-forward; reason: none

Claims:

  • Changeset: a truncated Text or Heading is read once because its tooltip no longer adds its text again as a description: verified (TruncationTooltip.tsx:190-198; Text.test.tsx:561, :585, :737 and Heading.test.tsx:527 fail on the base and pass with this patch; an accessibility-tree read after a hover shows the base description and none with this patch).
  • Changeset: other tooltips still describe their anchor: verified (Tooltip.tsx:250-268 and :320-332 are unchanged and the Tooltip suites pass).
  • Changeset: a Core patch fix: verified ([fix], @astryxdesign/core patch).
  • Before this change, the mounted tooltip described the element with its own text: verified (base accessibility tree; the red-first tests).
  • Button and TableHeaderCell cut-text tooltips were already undescribed and stay so: verified (Button.truncationTooltip.test.tsx:154, TableHeaderCell.truncationTooltip.test.tsx:193 and :199).
  • The truncation tooltip of Text, Heading and Lab's LineClamp renders the internal undescribed tooltip, which attaches its triggers and sets no description before or after it mounts: verified (TruncationTooltip.tsx:190-198, Tooltip.tsx:397-412, internal/line-clamp.ts:22-24).
  • The undescribed tooltip takes an optional placement and open state, and its hide callback becomes optional; without an open state, hover, tap and focus open it through useTooltip, which reads the interaction that mounted it: verified (Tooltip.tsx:384-397; useTooltip.tsx:829-851).
  • It is still not exported from any package entry: verified (Tooltip/index.ts:13-23; no public API rows).
  • Button and TableHeaderCell pass isOpen and behave as before: verified (Button.tsx:1240, TableHeaderCell.tsx:238).
  • The public Tooltip and the present-interest module are unchanged, and every Tooltip anchor still gains the tooltip id: verified (neither is in the diff; useTooltip.tsx and tooltipPresentInterest.ts are identical on base and head).
  • The Text and Heading records say the truncation tooltip adds no description, the compatibility and verification rows follow, and the Text record lists the internal tooltip: verified (Text.spec.md:86, :167, :209; Heading.spec.md:159, :199).
  • No public prop, export or hidden description node changes: verified (no API rows for Core or the seven themes).
  • The new and changed Text and Heading assertions fail on main: verified (four failures on the base).
  • The listed suites, typecheck, ESLint and the knowledge and changeset checks pass: verified for this patch before the merge of main (a 34-file run covering those suites passes; the exact 31-file set was not reproduced); on this head, CI's Core build, Storybook build and CLI smoke test pass, and its test, typecheck and lint jobs are still running.
  • First-load gzip on the four reference pages is docs +10 B, form +6 B, menu +7 B and table +15 B: verified (base and head builds of each page, before the merge of main).
  • The preflight run: verified where reproducible (build, typecheck, lint, UI tests, knowledge and changesets as above).
  • #11916 changes how a tooltip describes its trigger and also edits the undescribed tooltip and the Text truncation test, so the second to merge must merge main: verified (a trial merge conflicted in exactly those two files, before the merge of main).
  • #11830 shares the records and tests and merges cleanly with this change: verified (trial merge clean, before the merge of main).
  • Writing rubric: the records add no narration, research, project status or open questions: verified.

Files:

  • .changeset/truncation-tooltip-undescribed.md: clear.
  • docs/specs/components/Heading/Heading.spec.md: clear.
  • docs/specs/components/Text/Text.spec.md: clear.
  • packages/core/src/Button/Button.tsx: clear.
  • packages/core/src/Heading/Heading.test.tsx: clear.
  • packages/core/src/Table/TableHeaderCell.tsx: clear.
  • packages/core/src/Text/Text.test.tsx: clear.
  • packages/core/src/Text/TruncationTooltip.tsx: clear.
  • packages/core/src/Tooltip/Tooltip.tsx: clear.

Automated review (maintainer link)

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec eb20e0b

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. CI has run on this head and passed.

A truncated Text or Heading now exposes its full text once: after the first hover, tap or focus mounts its tooltip, the element no longer gets an accessible description equal to its own text, and the tooltip still opens with the same text. The public Tooltip still describes its anchor, and the Text and Heading record changes are approved for this head.

Claims and files checked

Review mode: same-head; reason: none

Claims:

  • Changeset: a truncated Text or Heading is read once because its tooltip no longer adds its text again as a description: verified (TruncationTooltip.tsx:190-198; Text.test.tsx:561, :585, :737 and Heading.test.tsx:527 fail on the base and pass with this patch; an accessibility-tree read after a hover shows the base description and none with this patch).
  • Changeset: other tooltips still describe their anchor: verified (Tooltip.tsx:250-268 and :320-332 are unchanged; Tooltip.test.tsx passes in CI on this head).
  • Changeset: a Core patch fix: verified ([fix], @astryxdesign/core patch).
  • Before this change, the mounted tooltip described the element with its own text: verified (the base's Tooltip anchor wiring; the red-first tests).
  • Button and TableHeaderCell cut-text tooltips were already undescribed and stay so: verified (Button.truncationTooltip.test.tsx:154, TableHeaderCell.truncationTooltip.test.tsx:193 and :199, passing in CI on this head).
  • The truncation tooltip of Text, Heading and Lab's LineClamp renders the internal undescribed tooltip, which attaches its triggers and sets no description before or after it mounts: verified (TruncationTooltip.tsx:190-198, Tooltip.tsx:384-412, internal/line-clamp.ts:21-24).
  • The undescribed tooltip takes an optional placement and open state, and its hide callback becomes optional; without an open state, hover, tap and focus open it through useTooltip, which reads the interaction that mounted it: verified (Tooltip.tsx:384-397; useTooltip.tsx:832-852).
  • It is still not exported from any package entry: verified (Tooltip/index.ts:13-23; no public API rows).
  • Button and TableHeaderCell pass isOpen and behave as before: verified (Button.tsx:1240, TableHeaderCell.tsx:238).
  • The public Tooltip and the present-interest module are unchanged, and every Tooltip anchor still gains the tooltip id: verified (neither file is in the diff).
  • The Text and Heading records say the truncation tooltip adds no description, the compatibility and verification rows follow, and the Text record lists the internal tooltip: verified (Text.spec.md:43, :86, :168, :209; Heading.spec.md:44, :160, :199).
  • No public prop, export or hidden description node changes: verified (no API rows for any package, in this review's comparison and in CI's report for this head).
  • The new and changed Text and Heading assertions fail on main: verified (four failures on the base with this patch's tests).
  • The listed suites, typecheck, ESLint and the knowledge and changeset checks pass: verified (CI on this head passes typecheck, lint and every UI and Node test shard, including the Text, Heading, Tooltip, Button, TableHeaderCell, SideNav and Lab LineClamp suites; the knowledge and changeset checks passed on this patch; the exact 31-file set was not reproduced).
  • First-load gzip on the four reference pages is docs +10 B, form +6 B, menu +7 B and table +15 B: verified (base and head builds of each page, measured on this identical patch).
  • The preflight run: verified where reproducible (CI on this head passes build, typecheck, lint, the UI and Node tests, and the interaction and accessibility browser jobs; the 35/35 and 89/89 tallies were not re-counted).
  • #11916 changes how a tooltip describes its trigger and also edits the undescribed tooltip and the Text truncation test, so the second to merge must merge main: verified (a trial merge on this head conflicts in exactly those two files, plus one that conflicts with main alone).
  • #11830 shares the records and tests and merges cleanly with this change: verified (trial merge on this head is clean).
  • Writing rubric: the records add no narration, research, project status or open questions: verified.

Files:

  • .changeset/truncation-tooltip-undescribed.md: clear.
  • docs/specs/components/Heading/Heading.spec.md: clear.
  • docs/specs/components/Text/Text.spec.md: clear.
  • packages/core/src/Button/Button.tsx: clear.
  • packages/core/src/Heading/Heading.test.tsx: clear.
  • packages/core/src/Table/TableHeaderCell.tsx: clear.
  • packages/core/src/Text/Text.test.tsx: clear.
  • packages/core/src/Text/TruncationTooltip.tsx: clear.
  • packages/core/src/Tooltip/Tooltip.tsx: clear.

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as ready for review November 21, 2026 10:09
github-actions Bot added a commit that referenced this pull request Nov 21, 2026
…pr12653-m2

# Conflicts:
#	packages/core/src/Button/Button.tsx
#	packages/core/src/Table/TableHeaderCell.tsx
#	packages/core/src/Text/TruncationTooltip.tsx
@cixzhang
cixzhang marked this pull request as draft November 21, 2026 14:08
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 21, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 1001e36

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 21, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: CI has not run on this head yet, because the pull request is a draft; its checks run once it is marked ready for review.

A truncated Text or Heading now exposes its full text once: after the first hover, tap or focus mounts its tooltip, the element no longer gets an accessible description equal to its own text, and the tooltip still opens with the same text. The public Tooltip still describes its anchor, and the Text and Heading record changes are approved for this head.

  • Non-blocking: the description's first-load gzip line reports an earlier head's measurement; at this head the four reference pages measure docs +16 B, form +10 B, menu +10 B and table +12 B, so please refresh that line.
Claims and files checked

Review mode: full; reason: merge-touches-pr-files

Claims:

  • Changeset: a truncated Text or Heading is read once because its tooltip no longer adds its text again as a description: verified (TruncationTooltip.tsx:189-196; Text.test.tsx:561, :585, :737 and Heading.test.tsx:527 fail on the base and pass on this head; Chromium's accessibility tree after a hover shows the base description and none on this head).
  • Changeset: other tooltips still describe their anchor: verified (the public Tooltip's anchor wiring, Tooltip.tsx:244-335, is unchanged; Tooltip.test.tsx and Tooltip.a11y.test.tsx pass).
  • Changeset: a Core patch fix: verified ([fix], @astryxdesign/core patch; the changeset check passes).
  • Before this change, the mounted tooltip set the element's description to its own text: verified (the base's Tooltip anchor wiring; the red-first failures; the base accessibility tree).
  • Button and TableHeaderCell cut-text tooltips were already undescribed and stay so: verified (Button.truncationTooltip.test.tsx:154, TableHeaderCell.truncationTooltip.test.tsx:193 and :199 pass on this head).
  • The truncation tooltip of Text, Heading and Lab's LineClamp renders the internal undescribed tooltip, which attaches its triggers and sets no description before or after it mounts: verified (TruncationTooltip.tsx:189-196, Tooltip.tsx:384-413, internal/line-clamp.ts:21-24).
  • The undescribed tooltip takes an optional placement and open state, and its hide callback becomes optional; without an open state, hover, tap and focus open it through useTooltip, which reads the interaction that mounted it: verified (Tooltip.tsx:384-397; useTooltip.tsx:830-852).
  • It is still not exported from any package entry: verified (Tooltip/index.ts; no package export reaches it; no public API rows).
  • The keyboard-focus cut-text hook passes the open state, so Button and TableHeaderCell behave as before: verified (cutTextOnKeyboardFocus.tsx:138-142; their suites pass).
  • The public Tooltip and the present-interest module are unchanged, and every Tooltip anchor still gains the tooltip id: verified (neither changes in the diff; the Tooltip suites pass).
  • The Text and Heading records say the truncation tooltip adds no description, the compatibility and verification rows follow, and the Text record lists the internal tooltip: verified (Text.spec.md:64, :86, :169, :210; Heading.spec.md:66, :160, :199).
  • No public prop, export or hidden description node changes: verified (no API rows for Core, the build package or the seven themes, comparing base and head builds).
  • The Text test expects no description after the first hover, where it expected the tooltip id before: verified (Text.test.tsx:561).
  • A hover and then a keyboard focus add no description to the Text or its link: verified (Text.test.tsx:567-605).
  • Keyboard focus inside the clamped text mounts the tooltip with no description: verified (Text.test.tsx:736-737).
  • The Heading test expects no description after the first hover: verified (Heading.test.tsx:526-529).
  • These new and changed assertions fail on main: verified (four failures on the base with this head's tests, each on the description).
  • The Text, Heading, Tooltip, Button, TableHeaderCell, SideNav and Lab LineClamp suites pass: verified (all pass on this head; the exact 31-file, 1,192-test set was not reproduced).
  • TypeScript, ESLint and the knowledge and changeset checks pass: verified (Core typecheck, ESLint on the changed files, the knowledge check and the changeset check pass; Lab's source typecheck passes).
  • First-load gzip on the four reference pages is docs +10 B, form +6 B, menu +7 B and table +15 B, as an earlier review measured: outdated (true for the earlier head it names; this head measures docs +16 B, form +10 B, menu +10 B and table +12 B), non-blocking.
  • The preflight run passes: verified where reproducible (build, typecheck, lint, the UI tests and the knowledge and changeset checks pass here; the browser-spec tallies and the Node-suite failures were not re-run).
  • #11916 also edits the undescribed tooltip and the Text truncation test, so the second to merge must merge main and keep both edits: verified (a trial merge with this head conflicts in exactly those two files beyond its conflicts with main).
  • #11830 shares the records and tests and merges cleanly with this change: verified (trial merge is clean).
  • Writing rubric: the records add no narration, research, rejected alternatives, change references, open questions or project status: verified.

Files:

  • .changeset/truncation-tooltip-undescribed.md: clear.
  • docs/specs/components/Heading/Heading.spec.md: clear.
  • docs/specs/components/Text/Text.spec.md: clear.
  • packages/core/src/Heading/Heading.test.tsx: clear.
  • packages/core/src/Text/Text.test.tsx: clear.
  • packages/core/src/Text/TruncationTooltip.tsx: clear.
  • packages/core/src/Text/cutTextOnKeyboardFocus.tsx: clear.
  • packages/core/src/Tooltip/Tooltip.tsx: clear.

Automated review (maintainer link)

…pr12653-m

# Conflicts:
#	packages/core/src/Text/TruncationTooltip.tsx
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 22, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 261c87e

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 22, 2026

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: CI has not run on this head yet, because the pull request is a draft; its checks run once it is marked ready for review.

A truncated Text or Heading now exposes its full text once: after the first hover, tap or focus mounts its tooltip, the element no longer gets an accessible description equal to its own text, and the tooltip still opens with the same text. The public Tooltip still describes its anchor, and the Text and Heading record changes are approved for this head.

Claims and files checked

Review mode: same-head; reason: none

Claims:

  • Changeset: a truncated Text or Heading is read once because its truncation tooltip no longer adds its own text as a description after it mounts: verified (TruncationTooltip.tsx:89-115, :225-232; Text.test.tsx:568, :795, :819, :970 and Heading.test.tsx:527 fail on the base and pass on the head; Chromium accessibility tree after a hover).
  • Changeset: other tooltips still describe their anchor: verified for the public Tooltip (Tooltip.tsx:254-259; Tooltip suites pass).
  • Changeset: a patch fix for the core package: verified (front matter; the changeset check passes).
  • Description: before, the mounted tooltip set the element's aria-describedby, so the text was read as name and again as description: verified (base runs of the new assertions receive the tooltip id; base accessibility tree).
  • Description: Button and TableHeaderCell cut-text tooltips were already undescribed and stay so: verified (cutTextOnKeyboardFocus.tsx:148-153; Button.truncationTooltip.test.tsx:154; TableHeaderCell.truncationTooltip.test.tsx:211, :217).
  • Description: every other tooltip still describes its anchor: verified (the public Tooltip's anchor wiring, Tooltip.tsx:244-296, is unchanged).
  • Description: the truncation tooltip of Text, Heading and Lab LineClamp renders the internal undescribed tooltip, which attaches its triggers and sets no description before or after it mounts: verified (TruncationTooltip.tsx:225-232; Tooltip.tsx:397-412; internal/line-clamp.ts:21-24).
  • Description: the internal tooltip takes optional placement and open state, its hide callback becomes optional, and without an open state hover, tap and focus open it through the shared hook that reads the mounting interaction; it is still not exported: verified (Tooltip.tsx:384-397; useTooltip.tsx:339; Tooltip/index.ts:13-23; no public API rows).
  • Description: the keyboard-focus cut-text hook passes the open state, so Button and TableHeaderCell behave as before: verified (cutTextOnKeyboardFocus.tsx:151; their suites pass).
  • Description: the public Tooltip and the present-interest module are unchanged, and every Tooltip anchor still gains the tooltip id: verified (diff limited to UndescribedTooltip; Tooltip.tsx:254-259).
  • Description: Text AR2 and Heading AR3, their compatibility and verification rows, and Text's ownership line say the tooltip adds no description: verified (both record diffs; approved for this head).
  • Description: no public prop, export or hidden description node changes: verified (no public API rows; no description node in the diff).
  • Description: the new and changed Text cases (first hover, hover then keyboard focus, keyboard focus inside) and the Heading case fail on main: verified (5 failures on the base, each on the new assertion).
  • Description: the Button and TableHeaderCell truncation tests already assert no description and still pass: verified.
  • Description: the listed suites, tsc, ESLint, the knowledge check and the changeset check pass: verified at this head (12 suites with 311 tests, Core typecheck, ESLint on the changed files, both checks); the file and test totals are the author's selection.
  • Description: first-load gzip on the four reference pages, docs +17 B, form +8 B, menu +10 B, table +16 B: verified (the earlier measurement at this head; a rebuild here gives docs +17 B, form +8 B, menu +9 B, table +12 B).
  • Description: preflight with browser specs on the author's Linux machine, and the node-project failures it lists: not reproduced; CI's browser and node jobs are skipped on this draft head.
  • Description: the overlapping pull requests, #11916 conflicting in the tooltip and the Text tests and #11830 merging cleanly: verified (both merged against this head).
  • Description: writing rubric results report no narration, research, change references, open questions or project status in the records: verified (both record diffs state present behavior only).

Files:

  • .changeset/truncation-tooltip-undescribed.md: clear
  • docs/specs/components/Heading/Heading.spec.md: clear (approved for this head)
  • docs/specs/components/Text/Text.spec.md: clear (approved for this head)
  • packages/core/src/Heading/Heading.test.tsx: clear
  • packages/core/src/Text/Text.test.tsx: clear
  • packages/core/src/Text/TruncationTooltip.tsx: clear
  • packages/core/src/Text/cutTextOnKeyboardFocus.tsx: clear
  • packages/core/src/Tooltip/Tooltip.tsx: clear

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as ready for review November 22, 2026 20:01
@cixzhang
cixzhang merged commit d834104 into main Nov 22, 2026
157 checks passed
cixzhang added a commit to shashank03-dev/astryx that referenced this pull request Nov 22, 2026
…he text

Maintainer edit. Since this branch, a hover opens a truncation tooltip on
the first mouse move, not on an arrival alone. The case from meta#12653 now
sends a move after its pointerenter, like the other Text hover cases.
cixzhang added a commit that referenced this pull request Nov 22, 2026
…nce it adds no description (#12653) and its layer mounts at the first show
@github-actions
github-actions Bot deleted the lane4/truncation-tooltip-undescribed branch November 23, 2026 06:06
cixzhang added a commit that referenced this pull request Nov 24, 2026
…ooltip (#11831)

* fix(Tooltip): a trigger that appears under a still pointer opens no tooltip

A browser sends a trigger its arrival (mouseenter) when the trigger appears or moves under a pointer that does not move, as after a click that opens a dialog whose close button lands under the pointer. The tooltip took that arrival as a hover and opened. Now the arrival only arms the hover, and the show delay starts on the first pointermove or mousemove over the trigger. A pointer that moves onto the trigger sends that move in the same frame, so a real hover opens as before. Firefox sends the pointermove before the mouseenter, so the mousemove after it counts too.

Truncated Text and Heading (and Lab's LineClamp) mount their tooltip on the first hover. That hover now also counts from the first mouse or pen pointermove, not from pointerenter, which the browser sends with the arrival. A mouse press still ends that hover until the pointer leaves.

Tests that opened a tooltip with a bare mouseEnter or pointerEnter now also send the move a browser sends with it.

Fixes #11605

* fix(Tooltip): the arrival comment describes the current hover path

* Merge branch 'main' into fix/tooltip-still-pointer

* fix(Tooltip): record what entering the trigger means, and pin it with two more cases

Maintainer edit after the specification review:
- Tooltip FR3 states its meaning: entering means the pointer moves onto
  the trigger; a trigger that appears or moves under a pointer that has not
  moved is not entered until the pointer moves. The wording follows
  bezabyte's proposal in #11819.
- Two browser cases keep the line from reaching too far: a wheel or
  keyboard scroll that brings the trigger under a still mouse opens nothing
  until the mouse moves; a mouse already over the trigger when it mounts
  opens it on its first move.
- The still-pointer unit cases press the trigger, which sets the document's
  interaction modality. They now reset it, so the keyboard-focus cases main
  added after this branch began still run with the keyboard default.

Co-authored-by: bezabyte <[email protected]>

* fix(Tooltip): a press before the first move ends the arrival too

A press on a trigger that appeared under a still mouse left the arrival
unmoved, so the next small move opened the tooltip over the control just
pressed. The press now clears it, as a press already ends a hover that
moved. A unit case covers arrival, press, then move.

* fix(Tooltip): WebKit's zero-movement move after a scroll is not a first move

Maintainer edit. After a scroll brings the trigger under a still mouse,
WebKit sends a trusted pointermove and mousemove with no movement at the
arrival's point; the hook counted it as the first real move and opened
the tooltip. A trusted move with zero movement at the point the arrival
recorded is now the arrival again. The wheel and keyboard scroll cases
move into TooltipStillPointerScroll.interaction.browser.spec.ts, so CI's
WebKit leg runs them on a Tooltip change.

* fix(Tooltip): decide a still arrival by where the mouse last moved, not by movement

Maintainer edit. WebKit reports no movement on any move, so the zero-
movement rule also swallowed the only move of a one-step arrival and the
tooltip never opened. The trigger now notes, at its arrival, whether the
mouse last moved at that same point (the window's input stream, which the
tooltips keep listening to pointermove); only then is a trusted move at
that point the arrival again. A mouse that came from elsewhere opens the
tooltip on its first move. The interaction spec adds the one-step hover,
so CI's WebKit leg covers it.

* fix(Tooltip): the last-pointer subscription lives only while a trigger is mounted

Maintainer edit, per Specs' conditions: the tooltips' pointermove
subscription to the window input stream is counted per window and ends
with the last mounted trigger (a listener-count test pins one listener
for two triggers, removed with the last). Its handler stores nothing and
reads no layout; the stream stores the point. react-component-runtime
lists the tooltips' last-pointer reading among the stream's subscribers.

* fix(Tooltip): Firefox's move before mouseenter is a real arrival

Maintainer edit. Firefox sends the move that brings the mouse onto the
trigger before the mouseenter, at the same point, so the window's last
mouse point already equals the arrival and a one-step hover read as a
resting arrival (no tooltip). The trigger now notes where it last heard a
move before its arrival (reset on leave); a move there at the arrival's
point means the mouse came from elsewhere. Firefox 151, Chromium 149:
a11y spec 15/15 and interaction spec 9/9 (x3).

* Merge branch 'main' into fix/tooltip-still-pointer

* fix(Tooltip, Text): one still-mouse check; a hover measures cut text once

Maintainer edit, after the main merge. The input stream now keeps each
window's mouse point before its latest pointermove; isMouseMove tells a
move from WebKit's post-scroll move at a still mouse's point. Tooltip
triggers and truncated text both use it, each holding a pointermove
subscription while mounted. The truncation tooltip's first hover is the
first real move after an enter, and it calls want() once per hover, so a
fitting Table cell measures once, as on main. main's measure-on-interest
Text tests send the hover's move. New: a once-per-hover unit case and
WebKit/Firefox/Chromium scroll cases for truncated Text and Heading.

* refactor(Tooltip, Text): the input stream holds mouse moves once per window

Maintainer edit for review. holdMouseMoves(view) in the input stream keeps
one counted pointermove subscription per window, and the stream records a
held window's last two mouse points on it. Tooltip triggers hold their
element's window, and truncated Text and Heading hold theirs while they can
show a tooltip, instead of one no-op subscriber each.

* fix(LineClamp): hold its window for the still-mouse check; docs

Maintainer edit for review. Lab's LineClamp passes its element to the
truncation tooltip hook, as Text and Heading do. The changeset says the
scroll case holds once the mouse has moved on the page; holdMouseMoves
and isMouseMove get their JSDoc and the file header names them.

* docs(Tooltip): the scroll case holds once the mouse moved since the trigger appeared

Maintainer edit for review: the changeset's qualifier matches what the
WebKit check gives, and the mouseMoves comment is split into short
sentences.

* test(Text): a mouse press before the first move ends the hover

Maintainer edit for review: the case fails without the truncation
tooltip's press flag and passes with it, as the description claims. The
isMouseMove comment is split to short lines.

* docs(Tooltip): split the isMouseMove comment's last sentence

* Merge branch 'main' into fix/tooltip-still-pointer

* fix(Tooltip): hold mouse moves only while a hover can open the tooltip

Maintainer edit. A controlled tooltip (isOpen) or a disabled one cannot
open on a hover, so it needs no still-mouse check. useTooltip now holds the
input stream's mouse moves in an effect keyed on enabled-and-uncontrolled,
not for every attached trigger. A page of controlled or disabled tooltips,
such as a Slider's thumb, adds no window listener at rest (AST-094 FR24's
Slider check holds as on main). A unit case pins the hold across disabled,
controlled and uncontrolled.

* fix(Tooltip): take the mouse-move hold on the trigger's own window

Maintainer edit. The hold now follows the trigger: its ref callback takes
or moves the hold when the trigger attaches, detaches or moves to another
document (an iframe), and an effect follows a later change to isEnabled or
isOpen. Before, an effect held whichever window it saw at mount, so a
trigger attached later or moved into an iframe was not held. A unit case
pins the hold across a late attach and a move into an iframe.

* fix(Tooltip): keep the mouse-move hold across a same-commit re-attach

Maintainer edit. A trigger whose ref changes identity on each render is
detached and re-attached in the same commit. Releasing the hold at once
dropped the window's last mouse point, so WebKit's repeated move after a
scroll counted as a first move. The detach now re-syncs the hold a
microtask later. A unit case pins one listener across such a re-render.

* style(Tooltip): put the touch comment back above the touch return

Maintainer edit. The arrival reset in handleMouseLeave moves above the
comment that explains the touch return, so the comment sits on the line
it describes. No behavior change.

* Merge branch 'main' into fix/tooltip-still-pointer

* test(Text): #12653's hover-then-focus case moves the mouse onto the text

Maintainer edit. Since this branch, a hover opens a truncation tooltip on
the first mouse move, not on an arrival alone. The case from #12653 now
sends a move after its pointerenter, like the other Text hover cases.

* test(ci): list the Tooltip still-pointer spec among the Firefox hover specs

Maintainer edit. TooltipStillPointer.a11y.browser.spec.ts moves the pointer
over Tooltip triggers, so FIREFOX_HOVER_SPECS names it and Firefox runs it,
as the list's completeness test requires.

* Merge branch 'main' into fix/tooltip-still-pointer

* docs(Text): name what the truncation tooltip's mouse-move hold tells apart

Maintainer edit. Comment only: active voice, and says isMouseMove tells a
still mouse's repeated move from a real move.

* Merge branch 'main' into fix/tooltip-still-pointer

* Merge branch 'main' into fix/tooltip-still-pointer

* Merge branch 'main' into fix/tooltip-still-pointer

* Merge branch 'main' into fix/tooltip-still-pointer

Co-authored-by: Cindy Zhang <[email protected]>
cixzhang added a commit that referenced this pull request Nov 24, 2026
* perf(Tooltip): the layer mounts at the tooltip's first show

Every Tooltip mounted its layer with its trigger, so a table with a
tooltip on every row mounted hundreds of closed layers and froze for
seconds. The layer now mounts at the first hover, focus, tap or show(),
in the same commit as that show, and then stays. Until then the
trigger's aria-describedby names hidden text with the same content, so
screen readers read the same description; the hidden text and the layer
are never in the page together. Tests that read the closed layer before
any interaction now read the tooltip after it.

* fix(Tooltip): a plain hidden copy describes the trigger until the first show

The stand-in description no longer plays the tooltip role, so the page
holds one tooltip per trigger. It renders through a portal into the
body of the trigger's document, so it sits in no paragraph and no
sibling rule. A server render carries no description and no reference
until it hydrates. TOOLTIP_PATTERN's rows that read the tooltip apply
once it has shown, and a new row checks the hidden copy before then.

* fix(Tooltip): the copy follows the layer's own mount and the trigger's root

The swap from the hidden copy to the tooltip reads the layer runtime's
mount store, so a show that waits for its trigger's box keeps the copy
until the layer mounts. A trigger in a shadow root keeps the copy in
that root. Switch and the MultiSelector status button leave an empty
describedby off. TOOLTIP_PATTERN checks the computed description
before the first show.

* Merge remote-tracking branch 'refs/remotes/l4/main-new' into lane4/tooltip-mount-on-first-intent

* test: read a tooltip's description before its first show

Tests that read a tooltip's layer before it opened now read the
trigger's description: the hidden copy until the layer mounts, then the
tooltip. Tests that need the open tooltip show it first. Each test keeps
its user-visible assertion.

* fix(Tooltip): the status-icon and date-input callers leave an empty describedby off

The field status-icon button and the DateInput, DateTimeInput and
DateRangeInput disabled-reason buttons no longer write an empty
aria-describedby in server and hydrating markup. The changeset states the
measured effect.

* Merge commit '88c4e0a8a7d62d66d678bb457e5d05edae3f88bc' into lane4/tooltip-mount-on-first-intent

* fix(Tooltip): a shadow-root trigger in another window keeps its copy in its root

The description root is found by node type, so a shadow root whose host
moved into an iframe's or another window's document still holds the
hidden copy, where the trigger's aria-describedby can name it.

* fix(Tooltip): a trigger that attaches again in the page moves its copy back

The trigger's ref callback now clears the stored description root when
the trigger attaches in the page's own body, so a hook trigger that
moves out of a shadow root or another window names a copy the page
holds.

* fix(Tooltip): the trigger's description root changes state only when it changes

Fields attach their tooltip through an inline ref at every commit, so
setting the root on every attach added a commit per render and left a
native TimeInput showing a cleared rejection. The ref callback now sets
it only when the root differs from the committed one.

* perf(CheckboxInput): the disabled-message tooltip runs only while it can show

Every checkbox called useTooltip, though the tooltip shows only when the checkbox is disabled and has a disabledMessage. On 1,000 checkboxes at 6x CPU in Chromium, useTooltip and its hooks were about a fifth of render and commit. The tooltip now lives in a child component that mounts only while the message can show; it attaches to the row and the checkbox, and reports its description id for the input's aria-describedby (an empty id is left out).

* fix(CheckboxInput): the disabled reason describes the checkbox in the server markup

The reason renders once in a visually hidden element whose id the input names in aria-describedby during render, so it is there before hydration and before the tooltip mounts or shows (spec:AST-013 FR9; component:CheckboxInput FR4, FR6). The tooltip still mounts only while the reason can show; its text is hidden from assistive technology, so the reason describes the checkbox once. An SSR test checks the server markup and a clean hydration.

* fix(CheckboxInput): the disabled reason renders once

The visually hidden copy describes the input in the server markup and until the tooltip's text is in the document; then the tooltip describes it and the copy goes, so a disabled checkbox with a reason renders the text once, as on main. The changeset names the server-markup fix.

* fix(CheckboxInput): hand the description to the tooltip from its surface's own ref

useTooltip gains an internal onSurfaceMount callback, driven by the layer surface's ref, so CheckboxInput learns when the tooltip text is in the document without a document observer. The per-checkbox MutationObserver is gone.

* refactor(Tooltip): keep onSurfaceMount off the public TooltipOptions

The surface callback moves to useTooltipInternal(options, {onSurfaceMount}), which the package does not export. Public useTooltip calls it with no internal options, so TooltipOptions is unchanged. CheckboxInput imports the internal entry.

* fix(CheckboxInput): name the reason with an id the checkbox owns; no Tooltip change

The tooltip's text is a span with the id the input's aria-describedby names. While the server renders and the client hydrates, the tooltip layer has no markup, so a visually hidden copy carries that id instead (useIsHydrating). useTooltip is back to main: no internal entry and no surface callback.

* Merge main into #11916's branch

* Merge #12376's branch (8ef2015)

# Conflicts:
#	packages/core/src/CheckboxInput/CheckboxInput.test.tsx
#	packages/core/src/CheckboxInput/CheckboxInput.tsx

* Tooltip: describe the trigger with an in-place hidden copy of its text

The trigger's aria-describedby names a hidden copy (the hidden attribute)
of the tooltip text, rendered next to the trigger in server and client
markup. The post-hydration portal copy and its mount store are gone; the
id never changes. The shown tooltip's content is hidden from assistive
technology (except while pinned), so the text is read once.

Truncation tooltips (UndescribedTooltip) and a Button tooltip that repeats
the name render no copy, through TooltipDescribesContext in
Tooltip/tooltipPresentInterest. Group trailing-radius rules skip hidden
elements. InfoTip and Slider find the tooltip through a private helper.

* test(Layer): a disabled reason may describe its control from inside the tooltip

CheckboxInput names its own reason text, which sits inside the tooltip
after the first show. The touch-target helper now accepts an
aria-describedby id that resolves inside the reason's tooltip.

* Merge #12376's branch (9ae1d5c)

* test(Tooltip): browser evidence for AR1 in Chromium and WebKit

A story with a wrapped Button, an icon tooltip that adds to the name, one
that repeats it, and a cut label. The spec checks the hidden copy and the
accessible description before and after the first show, once, and no
description on the repeat and cut-label paths. AR1 gets a verification row.

* Tooltip: component content reaches the description; FR10, AR1 and FR2 as ruled

- Content that holds a component renders into the hidden copy through a
  portal, filled on the client, so its text reaches the description and a
  block never breaks a paragraph in server markup.
- The shown content is aria-hidden on every path except a pinned tooltip.
- CheckboxInput's own reason is a hidden span.
- ButtonGroup and InputGroup skip only the tooltip copy, not every hidden
  follower.
- FR10 drops aria-controls from the pinning button; AR1 names the pinned
  exception; FR2 records the element-child and component-content
  server-markup gap. The changeset and content JSDoc say content renders
  once from mount.
- The browser spec finds the cut label's tooltip by text.

* Tooltip: the copy joins text through getNodeText; docs name the hydration group

- Host markup becomes the copy's text through the shared getNodeText, which
  joins block lines with a space; textOf is gone.
- The Chromium binding's coverage check skips the row for a trigger
  described by the tooltip itself, which no Astryx state meets.
- The changeset names the components whose tooltips name the copy only
  after hydration.
- The CustomToggleTrigger story drops aria-controls, as FR10 does.
- ButtonGroup.doc.mjs leaves the diff (formatting only).

* Merge main into lane4/tooltip-mount-on-first-intent

# Conflicts:
#	packages/core/src/CheckboxInput/CheckboxInput.test.tsx
#	packages/core/src/CheckboxInput/CheckboxInput.tsx
#	packages/core/src/Layer/touchTriggerTargets.test.tsx

* Merge remote-tracking branch 'origin/main' into lane4/tooltip-mount-on-first-intent

# Conflicts:
#	docs/specs/components/Tooltip/Tooltip.spec.md

* test(Tooltip): read the shown surface and the description copy as the first-show mount draws them

* fix(Tooltip): the trigger's description is the hidden copy only until the layer mounts, then the tooltip's content

* test(Tooltip): the trigger reads its description from the tooltip's content once it mounts

* docs(Tooltip): describedBy names the copy until the first show, then the content; AR6 drops aria-controls as FR10 does

* fix(Tooltip): the description's host reaches render through a store, not state; CheckboxInput drops a fragment

* refactor(Tooltip): description id helpers live with the trigger contracts, so a Button swizzle carries no tooltip runtime

* fix(Button): a caller's mounted tooltip content counts as its tooltip; the description host uses the shared store factory

* Merge main into lane4/tooltip-mount-on-first-intent

Resolves Button.tsx and useTooltip.tsx against #12443 and #11831's line: the cut label's tooltip comes from main's lazy cutText module, and its caller-tooltip check (now in cutText.tsx) also counts a description's hidden copy and mounted tooltip content. useTooltip keeps lazyMount, keepsMountAfterShow and main's getInvoker. SideNav's labelTooltipOf finds the tooltip through the trigger's description.

* test(Text, TextInput): main's new tooltip cases read the tooltip a first interaction mounts

* test(Selector, MultiSelector, Tooltip): RTL status tooltips read the shown tooltip; the coverage check skips the tooltip-described row only while every state describes with a copy

* test(cli): overlays come before progress-bar-track in the unreached list, a part main's themes still leave there

* test: TooltipDescription joins the Firefox hover specs; the Tooltip binding audit stays Chromium-only (DevTools protocol); prettier

* Merge remote-tracking branch 'origin/main' into lane4/tooltip-mount-on-first-intent

# Conflicts:
#	packages/core/src/Text/Text.test.tsx
#	packages/core/src/Tooltip/Tooltip.tsx

* test(Text): the truncation tooltip's mount reads its layer marker, since it adds no description (#12653) and its layer mounts at the first show

* docs(useTooltip): the hook's JSDoc sits on the hook again, not on TooltipDescription

* fix(ButtonGroup, InputGroup): the trailing edge skips a tooltip's description by its own private marker, so a caller's hidden element whose id ends in -description still counts as a member

* test: checks that read a closed tooltip's layer read its first show or its description inside it; the corner tests compile the trailing-edge owner too

* fix(Button): a cut label described by the caller's own -description element still shows on keyboard focus; tests hover named controls and count the new corner cases

* Merge remote-tracking branch 'origin/main' into lane4/tooltip-mount-on-first-intent

# Conflicts:
#	docs/specs/components/Tooltip/Tooltip.spec.md
#	packages/core/src/CheckboxInput/CheckboxInput.test.tsx
#	packages/core/src/CheckboxList/CheckboxList.test.tsx
#	packages/core/src/PowerSearch/PowerSearch.test.tsx
#	packages/core/src/RadioList/RadioList.test.tsx
#	packages/core/src/SegmentedControl/SegmentedControl.test.tsx
#	packages/core/src/Slider/Slider.test.tsx
#	packages/core/src/Switch/Switch.test.tsx
#	packages/core/src/Tokenizer/Tokenizer.test.tsx
#	packages/core/src/Tooltip/useTooltip.tsx

* test(Tooltip): hover tests send the move a browser sends with the arrival (#11831), and read the mount marker before a show

* test(Timestamp, RichTextEditor): hover tests send the move that follows the arrival

* test(Tooltip): the hidden copy reads inline markup as it renders

* Merge remote-tracking branch 'origin/main' into lane4/tooltip-mount-on-first-intent

* chore: comment-provenance baseline drops the Button and InputGroup citations this PR removed

* Merge remote-tracking branch 'origin/main' into lane4/tooltip-mount-on-first-intent

This branch was successfully deployed

1 active deployment
Preview — 261c87eb Deployed Nov 22, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) CLA Signed This label is managed by the Meta Open Source bot. lane:4 Astryx fix-loop lane 4 owns this

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant