Skip to content

fix(Text, Tooltip): on Android, the first tap on a button or link in truncated text opens its tooltip; a tap on a text field never does - #11213

Merged
cixzhang merged 6 commits into
mainfrom
lane4/text-tooltip-android-first-tap
Nov 12, 2026
Merged

cixzhang merged 6 commits into
mainfrom
lane4/text-tooltip-android-first-tap

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Primary intent

Fix: on Android, the first tap on a button or link inside truncated text opened nothing, while iOS opened the truncation tooltip. Also, a tap on a text field inside any tooltip's trigger now only focuses the field.

User or maintainer impact

  • People on Android phones: tapping a button or link inside truncated Text or Heading now opens the truncation tooltip on that first tap, as on iOS. Before, the first tap opened nothing and only a second tap did.
  • People typing on a phone: a tap on a text field inside a tooltip's trigger focuses the field and raises the keyboard. It doesn't open or close the tooltip, on the first tap or any later one. Before, once the tooltip was mounted, a tap on the field opened it over the field.
  • Keyboard users: unchanged. Tab focus inside clamped text mounts the tooltip without opening it; opening on keyboard focus is the recorded component:Text FR4 gap.
  • Builders: no API change.

Cause

Truncated Text and Heading mount their Tooltip on the first hover, completed tap or focus (TruncationTooltip.tsx's useTruncationTooltipInterest), and the mounted Tooltip answers that interaction by its own rules. Chrome on Android focuses a focusable element between a touch press and its click:

  1. The hold took that pointer focus as the interaction.
  2. It mounted the Tooltip, which read the focus and opened nothing, because a pointer focus is not :focus-visible.
  3. The tap's click then found the interaction already read, and was dropped.

iOS Safari doesn't focus on tap, so it was unaffected.

Fix

  • Text and Heading: onFocus holds only a keyboard focus. Its target matches :focus-visible (the test a mounted Tooltip opens on), and it isn't the focus of a touch or pen press that still waits for its tap. The tap recognizer already in use tells which: its new isTouchPressCurrent() is true only while a press waits for its tap and no key press or new press has come since (the existing gesture counter).
  • Tooltip's tap rule: a tap on a text-entry control inside the trigger focuses that control and doesn't open or close the tooltip; an open tooltip stays open while the keyboard rises. The check is findTextEntryControl, the shared on-screen-keyboard test, so a tap on a field's <label> counts too. A disabled field keeps its reason's tap, and a trigger that is itself a field keeps its own. The rule rides an internal argument only useTooltip passes, so HoverCard keeps its FR5 tap. This covers truncated text's first tap, because that tap reaches the mounted Tooltip's rule.
  • Cross-window: isTextEntryControl and findTextEntryControl read the element kind by name rather than with instanceof, so a field in a same-origin iframe or a Picture-in-Picture window counts. The focus check uses isElement for the same reason.

There's no new module, no new import crossing and no Effect.

Authority

  • component:Tooltip FR5, a new sentence (the specifications session's wording): "A tap on a text-entry control inside the trigger (input, textarea, contenteditable) focuses that control and does not open or close the tooltip."
  • component:Text AR2 and component:Heading AR3 (shared TruncationTooltip), in the specifications session's wording: "Only a keyboard focus counts as focus interest for mounting the tooltip (:focus-visible, not a touch or pen press's own focus); a tap counts and opens it, including a tap that focuses a focusable child, except a tap on a text-entry control, which only focuses it (Tooltip FR5)."
  • The specifications session ruled the Android behavior a correction: main opened nothing where iOS opens the tooltip.

Evidence

  • Red-first:
    • Text.test.tsx "opens on the first tap on a button inside truncated text, though the tap focuses it first" fails on main and passes.
    • Text.test.tsx "with the tooltip mounted, a tap on a text field opens nothing and focuses it; a tap on the text still toggles" fails at 98b47fb and passes.
    • Tooltip.test.tsx "a tap on a text-entry control inside the trigger focuses it and does not open or close the tooltip" fails at 98b47fb and passes.
    • HoverCard.test.tsx "opens on a tap on a text field inside its trigger when touchTrigger is "tap"" fails at 0d0cdc0 and passes (HoverCard FR5 unchanged).
    • Text.test.tsx "opens nothing on a tap on a text field inside truncated text; the tap only focuses it" and "mounts on a keyboard Tab to a text field inside the clamped text, and opens nothing" pass.
  • Suites: Text, Heading, Lab LineClamp, Tooltip, useTouchTrigger, the touch-trigger targets, the keyboard module and interaction modality pass: 25 files, 755 tests. Lint has 0 errors. The import-boundary check passes.
  • Device (0d0cdc0): a farm side-by-side on a Pixel (Android, Chrome) and an iPhone (iOS, Safari), with a button and a text field inside a truncated sentence.
    • A tap on the button opens the truncation tooltip on both phones; on main the Pixel's first tap opened nothing.
    • The first tap on the text field focuses it and raises the keyboard with no tooltip.
    • With the tooltip mounted, a tap on the field focuses it and leaves the tooltip alone; on main it opens the tooltip over the field.
    • A tap on the sentence opens and closes the tooltip.
    • Every other step matches main.
  • Device (this head, 6fcc1c1, and c463176 before it): a Pixel re-check of the three Tooltip cases, 3 takes each at each head. Help opens; the first field tap only focuses; with the tooltip open, a field tap focuses and leaves it alone.

Size

  • Lines: +275 / −31 over 11 files. TruncationTooltip.tsx +16 / −1; useTouchTrigger.ts the recognizer's isTouchPressCurrent and the text-entry tap rule; keyboardHeight.ts the cross-window kind checks; plus tests, the Tooltip, Text and Heading records, and a changeset.
  • App-level gzip (esbuild, minified): Text, Heading, Button and Link about +0.2 KB over main.

Scope

  • This PR has one primary intent.
  • Independently removable deltas were removed or split.
  • Public text and artifacts contain no internal Meta context.

Writing rubric results

Run over the component:Tooltip FR5 sentence, the component:Text AR2 and component:Heading AR3 sentence, and the verification rows changed here:

  • R1 narration: none; each sentence states the rule.
  • R2 research: none. R3 evidence: tests, not pull requests. R4: none. R5: none. R6: none. R7: none.

… truncated text opens its tooltip

Chrome on Android focuses a focusable element between a press and its
click. The truncation tooltip's first-interaction hold took that pointer
focus as the interaction, mounted the Tooltip, which read it and opened
nothing (a pointer focus is not :focus-visible), and the tap's click was
then dropped. The hold now takes only a :focus-visible focus, the one a
mounted Tooltip opens on, so the click stays the held tap. Keyboard focus
inside the text still mounts it.
@vercel

vercel Bot commented Nov 11, 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 12, 2026 9:19am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 11, 2026
@cixzhang cixzhang added ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) labels Nov 11, 2026
@astracat-bot

astracat-bot Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 12, 2026, 10:25 AM UTC

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

Copy link
Copy Markdown
Contributor Author

/approve-spec 110aefd

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 6fcc1c1

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
LayerProvider 4.4 kB (0) · 20 B CSS (0) — ✓ · ✓ · ✗
Link 55.1 kB (+272 B) · 7.1 kB CSS (0) — — · — · —
Spinner 26.7 kB (+262 B) · 6.2 kB CSS (0) — — · — · —
133 more components
Component Size LoC Visual · A11y · RTL
lab/LineClamp 15.9 kB (+262 B) · 168 B CSS (0) — — · — · —
ChatToolCalls 34.4 kB (+258 B) · 8.4 kB CSS (0) — — · — · —
DropdownMenuSubMenu 72.3 kB (+258 B) · 9.7 kB CSS (0) — — · — · —
CommandPaletteInput 33.9 kB (+251 B) · 7.6 kB CSS (0) — — · — · —
Heading 14.3 kB (+250 B) · 5.5 kB CSS (0) — — · — · —
Thumbnail 67.7 kB (+249 B) · 11.6 kB CSS (0) — — · — · —
lab/EmojiPicker 90.2 kB (+249 B) · 751 B CSS (0) — — · — · —
ChatMessageList 30.1 kB (+248 B) · 7.1 kB CSS (0) — — · — · —
CheckboxList 71.7 kB (+247 B) · 7.8 kB CSS (0) — — · — · —
Timer 15.9 kB (+247 B) · 6.0 kB CSS (0) — — · — · —
Stepper 65.0 kB (+244 B) · 10.2 kB CSS (0) — — · — · —
Text · Storybook 13.8 kB (+244 B) · 5.5 kB CSS (0) 729 (+13) ✓ · ✓ · —
lab/SelectableCardGroup 67.5 kB (+242 B) · 162 B CSS (0) — — · — · —
lab/ListInput 91.4 kB (+241 B) · 922 B CSS (0) — — · — · —
lab/TransferList 105.5 kB (+241 B) · 1.2 kB CSS (0) — — · — · —
Timestamp 35.0 kB (+239 B) · 10.3 kB CSS (0) — — · — · —
CheckboxListItem 74.4 kB (+235 B) · 11.5 kB CSS (0) — — · — · —
TextInput 71.0 kB (+235 B) · 11.2 kB CSS (0) — — · — · —
lab/DiffViewer 90.8 kB (+233 B) · 2.1 kB CSS (0) — — · — · —
CodeBlock 78.5 kB (+231 B) · 11.3 kB CSS (0) — — · — · —
TableSelectionToolbar 73.7 kB (+231 B) · 13.3 kB CSS (0) — — · — · —
Field 58.0 kB (+228 B) · 7.3 kB CSS (0) — — · — · —
RadioListItem 70.5 kB (+226 B) · 10.2 kB CSS (0) — — · — · —
TextArea 65.4 kB (+223 B) · 9.4 kB CSS (0) — — · — · —
Calendar 74.2 kB (+219 B) · 10.6 kB CSS (0) — — · — · —
RadioList 59.4 kB (+217 B) · 7.3 kB CSS (0) — — · — · —
FileInput 72.3 kB (+216 B) · 11.0 kB CSS (0) — — · — · —
SideNavCollapseButton 64.2 kB (+215 B) · 10.1 kB CSS (0) — — · — · —
ChatSendButton 63.7 kB (+214 B) · 10.0 kB CSS (0) — — · — · —
lab/DialogHeroHeader 86.4 kB (+214 B) · 372 B CSS (0) — — · — · —
InputGroup 59.7 kB (+213 B) · 7.9 kB CSS (0) — — · — · —
Avatar 45.1 kB (+212 B) · 5.6 kB CSS (0) — — · — · —
ChatDictationButton 63.9 kB (+212 B) · 10.1 kB CSS (0) — — · — · —
DrawerHeader 66.3 kB (+212 B) · 13.0 kB CSS (0) — — · — · —
DialogHeader 66.1 kB (+211 B) · 11.5 kB CSS (0) — — · — · —
Banner 65.3 kB (+210 B) · 10.5 kB CSS (0) — — · — · —
richtext/RichTextView 279.8 kB (+210 B) · 2.3 kB CSS (0) — — · — · —
NumberInput 74.9 kB (+209 B) · 11.5 kB CSS (0) — — · — · —
AvatarGroup 47.9 kB (+208 B) · 5.8 kB CSS (0) — — · — · —
ListItem 73.4 kB (+208 B) · 11.5 kB CSS (0) — — · — · —
MobileNavToggle 63.6 kB (+203 B) · 10.0 kB CSS (0) — — · — · —
TopNav 75.6 kB (+203 B) · 11.0 kB CSS (0) — — · — · —
richtext/RichTextEditor 301.6 kB (+203 B) · 2.6 kB CSS (0) — — · — · —
ChatComposer 82.7 kB (+201 B) · 12.1 kB CSS (0) — — · — · —
IconButton 63.3 kB (+201 B) · 10.0 kB CSS (0) — — · — · —
SideNavHeading 79.8 kB (+201 B) · 11.3 kB CSS (0) — — · — · —
StatusDot 33.0 kB (+201 B) · 5.4 kB CSS (0) — — · — · —
Button 63.3 kB (+199 B) · 10.0 kB CSS (0) — — · — · —
ChatLayoutScrollButton 63.9 kB (+199 B) · 10.2 kB CSS (0) — — · — · —
CheckboxInput 67.3 kB (+199 B) · 9.2 kB CSS (0) — — · — · —
HoverCard · Storybook 29.5 kB (+199 B) · 4.4 kB CSS (0) 836 (0) ✓ · ✓ · —
TopNavHeading 79.3 kB (+199 B) · 11.3 kB CSS (0) — — · — · —
TopNavMenu 78.8 kB (+199 B) · 11.3 kB CSS (0) — — · — · —
lab/CommentPin 59.2 kB (+198 B) · 1.2 kB CSS (0) — — · — · —
BaseTypeahead 76.5 kB (+197 B) · 11.0 kB CSS (0) — — · — · —
AvatarGroupOverflow 50.7 kB (+196 B) · 5.7 kB CSS (0) — — · — · —
lab/TabBarMoreList 95.7 kB (+194 B) · 1.8 kB CSS (0) — — · — · —
SideNavItem 75.0 kB (+191 B) · 11.2 kB CSS (0) — — · — · —
SideNav 118.2 kB (+190 B) · 11.4 kB CSS (0) — — · — · —
Tooltip · Storybook 31.3 kB (+189 B) · 4.4 kB CSS (0) 870 (+1) ✓ · ✓ · ✓
BreadcrumbItem 88.9 kB (+187 B) · 12.1 kB CSS (0) — — · — · —
MobileNav 73.9 kB (+184 B) · 10.6 kB CSS (0) — — · — · —
TopNavMegaMenu 74.2 kB (+184 B) · 11.9 kB CSS (0) — — · — · —
ChatLayout 86.1 kB (+181 B) · 10.6 kB CSS (0) — — · — · —
Typeahead 85.6 kB (+178 B) · 12.5 kB CSS (0) — — · — · —
ChatComposerTokenElement 80.4 kB (+177 B) · 11.3 kB CSS (0) — — · — · —
ChatComposerInput 80.4 kB (+176 B) · 11.3 kB CSS (0) — — · — · —
FieldLabel 54.0 kB (+176 B) · 5.7 kB CSS (0) — — · — · —
Toast 101.2 kB (+175 B) · 10.3 kB CSS (0) — — · — · —
TabMenu 76.0 kB (+174 B) · 11.2 kB CSS (0) — — · — · —
Switch 106.8 kB (+173 B) · 10.0 kB CSS (0) — — · — · —
ToggleButton 90.0 kB (+173 B) · 10.1 kB CSS (0) — — · — · —
ComplexSelector 75.6 kB (+172 B) · 11.9 kB CSS (0) — — · — · —
AppShell 95.1 kB (+171 B) · 13.5 kB CSS (0) — — · — · —
SegmentedControl 99.7 kB (+167 B) · 6.9 kB CSS (0) — — · — · —
InfoTip 49.5 kB (+165 B) · 5.4 kB CSS (0) — — · — · —
Lightbox 125.9 kB (+160 B) · 10.6 kB CSS (0) — — · — · —
Slider 112.3 kB (+160 B) · 8.8 kB CSS (0) — — · — · —
Markdown 192.5 kB (+155 B) · 20.8 kB CSS (0) — — · — · —
AlertDialog 109.1 kB (+152 B) · 14.6 kB CSS (0) — — · — · —
lab/TransferListSelector 114.1 kB (+149 B) · 1.4 kB CSS (0) — — · — · —
charts/ChartTooltip 185.9 kB (+148 B) · 451 B CSS (0) — — · — · —
lab/CommentThread 350.9 kB (+147 B) · 2.4 kB CSS (0) — — · — · —
TableCell 113.5 kB (+144 B) · 18.0 kB CSS (0) — — · — · —
CommandPalette 75.1 kB (+143 B) · 12.7 kB CSS (0) — — · — · —
lab/Schedule 109.6 kB (+142 B) · 3.9 kB CSS (0) — — · — · —
lab/TourStep 101.4 kB (+138 B) · 590 B CSS (0) — — · — · —
TableHeaderCell 113.1 kB (+137 B) · 17.7 kB CSS (0) — — · — · —
ContextMenu 112.2 kB (+135 B) · 17.5 kB CSS (0) — — · — · —
DateTimeInput 214.6 kB (+134 B) · 18.8 kB CSS (0) — — · — · —
lab/CommentComposer 156.2 kB (+134 B) · 1.9 kB CSS (0) — — · — · —
charts/Chart 208.7 kB (+133 B) · 516 B CSS (0) — — · — · —
Carousel 73.0 kB (+130 B) · 11.0 kB CSS (0) — — · — · —
Tokenizer 101.3 kB (+129 B) · 19.2 kB CSS (0) — — · — · —
charts/ChartLegend 53.7 kB (+128 B) · 224 B CSS (0) — — · — · —
lab/ChatEmojiPicker 110.4 kB (+128 B) · 773 B CSS (0) — — · — · —
PowerSearch 297.7 kB (+126 B) · 24.5 kB CSS (0) — — · — · —
Popover 95.1 kB (+122 B) · 14.3 kB CSS (0) — — · — · —
MoreMenu 101.4 kB (+121 B) · 17.6 kB CSS (0) — — · — · —
DateRangeInput 97.2 kB (+120 B) · 12.5 kB CSS (0) — — · — · —
lab/ChatReactionBar 111.5 kB (+120 B) · 1.1 kB CSS (0) — — · — · —
Table 129.4 kB (+119 B) · 18.4 kB CSS (0) — — · — · —
DropdownMenu 101.2 kB (+117 B) · 17.6 kB CSS (0) — — · — · —
Pagination 114.6 kB (+117 B) · 17.8 kB CSS (0) — — · — · —
lab/Comments 357.7 kB (+116 B) · 2.5 kB CSS (0) — — · — · —
Selector 104.5 kB (+113 B) · 17.5 kB CSS (0) — — · — · —
TimeInput 167.3 kB (+111 B) · 16.1 kB CSS (0) — — · — · —
DateInput 192.4 kB (+108 B) · 17.1 kB CSS (0) — — · — · —
richtext/RichTextEditorToolbar 283.5 kB (+94 B) · 454 B CSS (0) — — · — · —
MultiSelector 99.3 kB (+93 B) · 16.9 kB CSS (0) — — · — · —
LayoutPanel 22.0 kB (+91 B) · 4.9 kB CSS (0) — — · — · —
TabList 46.6 kB (+90 B) · 6.5 kB CSS (0) — — · — · —
BottomSheetSwitcher 18.7 kB (+80 B) · 3.4 kB CSS (0) — — · — · —
Toolbar 46.4 kB (+80 B) · 8.1 kB CSS (0) — — · — · —
NavHeadingMenu 17.0 kB (+71 B) · 3.5 kB CSS (0) — — · — · —
Drawer 52.6 kB (+68 B) · 8.3 kB CSS (0) — — · — · —
ResizeHandle 22.2 kB (+60 B) · 4.3 kB CSS (0) — — · — · —
Collapsible 28.6 kB (+56 B) · 4.5 kB CSS (0) — — · — · —
DropdownMenuCheckboxItem 23.4 kB (+49 B) · 6.6 kB CSS (0) — — · — · —
TreeList 45.8 kB (+42 B) · 5.6 kB CSS (0) — — · — · —
DropdownMenuRadioItem 23.5 kB (+39 B) · 6.6 kB CSS (0) — — · — · —
DropdownMenuItem 22.6 kB (+27 B) · 6.3 kB CSS (0) — — · — · —
Dialog 24.9 kB (+20 B) · 6.9 kB CSS (0) — — · — · —
lab/NavigationStack 83.5 kB (+13 B) · 1.5 kB CSS (0) — — · — · —
lab/NavigationScreen 83.5 kB (+12 B) · 1.5 kB CSS (0) — — · — · —
lab/TabBar 81.9 kB (+12 B) · 1.8 kB CSS (0) — — · — · —
ButtonGroup 43.5 kB (+10 B) · 3.7 kB CSS (0) — — · — · —
ContextMenuItem 32.9 kB (+3 B) · 6.3 kB CSS (0) — — · — · —
ProgressBar 12.0 kB (0) · 6.4 kB CSS (0) — — · — · —
lab/TabBarItem 3.9 kB (0) · 1.8 kB CSS (0) — — · — · —
BottomSheet 69.4 kB (−4 B) · 7.7 kB CSS (0) — — · — · —
layer — — — · ✓ · —
Layer — — ✓ · ✓ · —

Package size: @astryxdesign/core 7.33 MB packed (+1.1 kB); no new dependencies.

Touched components checked; add ci:run-visual or ci:run-rtl to run the full suites.

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.

Requesting changes. The fix works for the case it targets (the first tap on a button or link inside truncated Text now opens the truncation Tooltip, and the new component:Text AR2 sentence has an engineering owner's approval for this head), but four things need fixing first:

  • Keyboard focus inside truncated Text, Heading or LineClamp rendered into a same-origin iframe or Picture-in-Picture window no longer mounts the Tooltip, because event.target instanceof Element (TruncationTooltip.tsx:150) is false for another window's elements, while isElement from utils/nodeType.ts works across windows.
  • The first tap on a text field inside clamped text still opens nothing, because a tapped field matches :focus-visible, so either also ignore a focus while a touch or pen press waits for its tap, or narrow the title, the description and the AR2 sentence to children a tap does not leave :focus-visible, such as buttons and links.
  • The "(Tooltip still loading)" test runs after earlier tests have loaded the Tooltip module and passes on main when run alone, so drop it (and "still loading" in the verification row) or give it a freshly loaded module.
  • component:Heading AR3 shares this hold but still says the Tooltip mounts on any first focus, so it needs the same rule as AR2.

The next commit needs a fresh /approve-spec from an engineering owner, and a shorter wording for the new source comment is suggested inline.

Automated review (maintainer link)

Comment thread packages/core/src/Text/Text.test.tsx Resolved
Comment thread docs/specs/components/Text/Text.spec.md Resolved
@cixzhang
cixzhang marked this pull request as ready for review November 11, 2026 11:23
…xt field's included; cross-window elements

A tapped text field matches :focus-visible, so the hold also skips a
focus while the touch or pen press's gesture is still current (a key
press makes a new one). The focus target check uses isElement, which
works for elements in another window. The Heading record gets AR2's
rule as AR3, and the still-loading test, which did not exercise a fresh
module, is replaced by a text-field case.
@cixzhang
cixzhang marked this pull request as draft November 11, 2026 14:32
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 11, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec eb03abc

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 11, 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.

Requesting changes: the first-tap fix works (a trusted Chromium touch tap on a button or a text field inside truncated Text now opens the tooltip, and both new tests fail on main), but two things need a change, and one small change fixes both:

  • In truncated text rendered into a same-origin iframe or Picture-in-Picture window, a touch on the clamped text that becomes a scroll leaves later keyboard focus there unable to mount the tooltip, because touchPressGestureRef is not cleared when the press ends and the gesture counter sees only the page window's keys and presses (TruncationTooltip.tsx:141, :156).
  • touchPressGestureRef copies the press tracking that the shared TapRecognizer this hook already calls owns (useTouchTrigger.ts:131-146): give the recognizer an isWaiting() read (a touch or pen press still waiting for its tap, in its own gesture), call it from onFocus, and delete the ref.

The new comment at TruncationTooltip.tsx:126-128 could be shorter and in active voice (non-blocking). Because this pull request changes spec records, the commit with the fix needs a fresh /approve-spec from an engineering owner.

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as ready for review November 11, 2026 16:30
…focuses it

A touch or pen press on a text-entry control is not taken as a tap, so
no tooltip covers text the person starts to type. The tap recognizer
gains isTouchPressCurrent(), which the focus hold reads in place of a
direct gesture-counter import (no new import crossing). Text AR2 and
Heading AR3 state the rule.
@cixzhang
cixzhang marked this pull request as draft November 11, 2026 16:49
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 11, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 98b47fb

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 11, 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.

Requesting changes. The Android first-tap fix works for buttons and links (the red-first test fails on main, and a trusted Chromium touch tap now opens the tooltip), and the new AR2/AR3 sentence has an engineering owner's approval for this commit, but five things need a change:

  • Miss: the Lint check fails at this commit because the it.each table at Text.test.tsx:706 and :715 holds JSX elements with no key ("Missing 'key' for element when rendering list").
  • In a same-origin iframe or Picture-in-Picture window, the first tap on a text field inside truncated text opens the tooltip over it, because isTextEntryControl (keyboard/keyboardHeight.ts:306-331) checks instanceof against the page's own window (TruncationTooltip.tsx:140-146).
  • In an iframe or Picture-in-Picture window, Tab focus after a touch on the clamped text that became a scroll still mounts no tooltip, because touchPressGesture (useTouchTrigger.ts:132, :159-160) outlives the press and the gesture counter only sees the page window's keys and presses.
  • Miss: the text-entry check at TruncationTooltip.tsx:139-143 copies the first half of findTextEntryControl (keyboard/keyboardHeight.ts:334-353) and loses its label case, so a tap on a field's label inside truncated text focuses the field and opens the tooltip over it.
  • The title, the changeset's text-field sentence and the description's keyboard and size lines promise more than the change does: a text field is excluded, its first tap already opened nothing on main, a mounted tooltip still opens on it, keyboard focus inside the clamped text mounts the tooltip without opening it, and TruncationTooltip.tsx changes by +29/−1, not +22.

The earlier note that a contenteditable region loses its tap is withdrawn: in a browser the tooltip already stayed shut there. Because this pull request changes spec records, the commit with the fixes needs a fresh /approve-spec from an engineering owner; the comment at TruncationTooltip.tsx:162-164 could also be shorter and in active voice (non-blocking).

Claims and files checked
  • Changeset: the first tap on a button or link in truncated text opens the tooltip on Android — verified (TruncationTooltip.tsx:156-171, red-first button test).
  • Changeset: a tap's own focus no longer takes the tap, and only a keyboard focus counts — verified on the page; false in an iframe after a touch scroll (Layer/gestureCounter.ts:81-94).
  • Changeset: a tap on a text field only focuses it, so no tooltip covers typed text — false (a mounted tooltip opens on it, Layer/useTouchTrigger.ts:559-590; an iframe's first tap opens it).
  • Description: a text-field tap now only focuses it on every platform — false beyond a direct first tap on the page.
  • Description: tapping any focusable element now opens the tooltip on the first tap — false for text fields (the head's own text-field test).
  • Description: keyboard Tab focus still mounts and opens the tooltip — mounting verified; opening false (utils/triggerFocus.ts:52-64, Text.test.tsx:672-674).
  • Description: no API change — verified.
  • Description: the old hold took the tap's focus, mounted the tooltip shut and dropped the click — verified (TruncationTooltip.tsx:99-110, Tooltip/useTooltip.tsx:796-818).
  • Description: focus is held only when it is focus-visible and not a press's own focus — verified (TruncationTooltip.tsx:156-171).
  • Description: the recognizer's new check holds until a key or a new press — verified on the page; not in another document.
  • Description: a touch or pen press on a text-entry control is not taken as a tap — verified for a direct tap on the page (TruncationTooltip.tsx:137-147); labels and other documents are missed.
  • Description: the target check works for elements in another window — verified for isElement; isTextEntryControl does not.
  • Description: no new module and no Effect — verified.
  • Description: both records now state the keyboard-focus rule — verified (both spec diffs).
  • Description: the red-first results for the button and text-field tests — verified (the button test fails on the base code; the text-field test passes there, as stated against the previous commit).
  • Description: the keyboard test mocks focus-visible as the Tooltip tests do — verified (Tooltip.test.tsx:377).
  • Description: the Text, Heading and LineClamp suites pass — verified on this commit.
  • Description: Pixel and iPhone results at this commit — taken from the text statement.
  • Description: line counts — the total is verified; TruncationTooltip.tsx +22 is false (+29/−1).
  • Description: bundle size changes — not checked.
  • .changeset/text-tooltip-android-first-tap.md — finding (text-field sentence).
  • docs/specs/components/Heading/Heading.spec.md — clear.
  • docs/specs/components/Text/Text.spec.md — clear.
  • packages/core/src/Layer/useTouchTrigger.ts — finding (the press gesture outlives the press).
  • packages/core/src/Text/Text.test.tsx — finding (Lint fails at lines 706 and 715).
  • packages/core/src/Text/TruncationTooltip.tsx — findings (text field in another document, label taps, comment wording).

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as ready for review November 11, 2026 20:09
Tooltip FR5: a tap on a text-entry control inside the trigger focuses
that control and does not open or close the tooltip, on the first tap
and every later one; TruncationTooltip no longer needs its own check.
isTextEntryControl and findTextEntryControl read the element kind by
name, so a field in another window counts. The tap recognizer's
isTouchPressCurrent holds only while a press waits for its tap. Lint:
keys for the JSX in the it.each table.
@cixzhang
cixzhang marked this pull request as draft November 11, 2026 22:33
@cixzhang cixzhang changed the title fix(Text, Heading): on Android, the first tap on a focusable child of truncated text opens its tooltip fix(Text, Tooltip): on Android, the first tap on a button or link in truncated text opens its tooltip; a tap on a text field never does Nov 11, 2026
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 11, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 0d0cdc0

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 11, 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.

Requesting changes. The Android first-tap fix for buttons and links works, and the Text, Heading and Tooltip record sentences carry an engineering owner's approval for this commit, but two things need a change:

  • The text-field return sits in the tap answer every useTouchTrigger caller shares (packages/core/src/Layer/useTouchTrigger.ts:562-571), so a tap on a text field inside a HoverCard trigger no longer opens the card under touchTrigger="tap" (or auto with a wrapper trigger) or closes an open one, which contradicts the HoverCard record's FR5; keep the rule Tooltip-only (for example an option only useTooltip passes), or amend HoverCard FR5 with an engineering owner's approval and name HoverCard in the changeset.
  • The changeset's "so no tooltip covers text you start to type" (.changeset/text-tooltip-android-first-tap.md:5) is not what happens once the tooltip is open: a field tap now leaves it open while the keyboard rises (the new Tooltip.test.tsx case asserts this), where main closed it, so please end that sentence at "no longer opens or closes the tooltip".

Non-blocking: the comment at useTouchTrigger.ts:563-564 repeats the same reason, and the field rule also catches a not-read-only aria-disabled input (whose reason FR5 says opens on a tap) and a trigger that is itself a field; see the inline note. Because the pull request changes spec records, the commit with the fixes needs a fresh /approve-spec.

Claims and files checked
  • Changeset: on Android the first tap on a button or link inside truncated Text or Heading opens the tooltip, as on iOS: verified (TruncationTooltip.tsx:144-158; red-first case Text.test.tsx:705).
  • Changeset: the tap's own focus used to take the tap, and now only a keyboard focus counts: verified (TruncationTooltip.tsx:147-155, useTouchTrigger.ts:160-161).
  • Changeset: a tap on a text field inside a tooltip's trigger focuses it and no longer opens or closes the tooltip: verified for Tooltip (useTouchTrigger.ts:562-571, Tooltip.test.tsx:478-506); the same code also changes HoverCard (finding).
  • Changeset: so no tooltip covers text you start to type: false once the tooltip is open (Tooltip.test.tsx:503-505; finding).
  • Changeset: this includes a text field inside truncated text: verified (Text.test.tsx:716, :760).
  • Description: Android first taps on buttons and links now open the tooltip where only a second tap did: verified in code (the base hold took the press's focus and dropped the click).
  • Description: a field tap only focuses the field, on the first and every later tap, where a mounted tooltip opened over it: verified (Text.test.tsx:760); on main that tap also closed an open tooltip, which the description does not mention.
  • Description: keyboard users are unchanged, and Tab inside clamped text mounts the tooltip without opening it: verified (Text.test.tsx:671, :799).
  • Description: no API change: verified for exports and signatures (CI's API report lists no rows); the exported touch hook's tap behavior changes (finding).
  • Description: the cause, in three steps: verified (the mounted Tooltip reads the first interaction once).
  • Description: the hold reads a recognizer flag that is true only while a touch or pen press waits for its tap with no key or new press since: verified (useTouchTrigger.ts:120-162).
  • Description: the tooltip rule uses the shared text-entry check, so a tap on a field's label counts: verified (keyboardHeight.ts:347-351).
  • Description: the text-entry checks read element kinds by name, and the focus check works across windows: verified (keyboardHeight.ts:306-352, TruncationTooltip.tsx:148).
  • Description: no new module, no new import crossing and no Effect: verified (Layer already imports the keyboard module).
  • Description: the quoted Text, Heading and Tooltip record sentences: verified against the record changes.
  • Description: the red-first tests fail before the fix and pass after it: consistent with the code paths; not rerun.
  • Description: the test suites, lint and the import-boundary check pass: not rerun; on this commit CI's lint, typecheck and Core unit, interaction and accessibility jobs passed, while one unit shard timed out in a CLI packing test this pull request does not touch and needs a rerun.
  • Description: Pixel and iPhone results on this commit: taken as stated.
  • Description: +244/−31 lines, TruncationTooltip.tsx +16/−1: verified.
  • Description: about +0.2 KB gzip for Text, Heading, Button and Link: not checked; CI's package report shows Core's packed size within budget.
  • Files: .changeset/text-tooltip-android-first-tap.md finding; packages/core/src/Layer/useTouchTrigger.ts finding; docs/specs/components/Tooltip/Tooltip.spec.md clear for Tooltip (HoverCard FR5 left unamended); docs/specs/components/Text/Text.spec.md clear; docs/specs/components/Heading/Heading.spec.md clear; packages/core/src/Text/TruncationTooltip.tsx clear; packages/core/src/keyboard/keyboardHeight.ts clear (non-blocking note); packages/core/src/Text/Text.test.tsx clear; packages/core/src/Tooltip/Tooltip.test.tsx clear.

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as ready for review November 12, 2026 03:17
…s FR5's tap

The rule rides an internal argument only useTooltip passes, so a tap on
a text field inside a HoverCard trigger still opens and closes the card.
A disabled field keeps its reason's tap, and a trigger that is itself a
field keeps its own. The changeset no longer claims an open tooltip
closes on a field tap.
@cixzhang
cixzhang marked this pull request as draft November 12, 2026 04:20
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec c463176

@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.

Requesting changes. The touch fix holds up: the first tap on a button or link inside truncated Text or Heading opens its tooltip, the text-field rule stays Tooltip's so HoverCard keeps its tap, and the Text, Heading and Tooltip record sentences carry an engineering owner's approval for this commit.

  • The JSDoc at packages/core/src/Layer/useTouchTrigger.ts:436 ("(Tooltip FR5)") and the comment at :568 ("Tooltip FR5.") cite a record claim, which @astryx/no-comment-provenance reports as an error in CI's strict pnpm lint with no baseline entry for this file, so the Lint job fails once CI runs; dropping the two citations and keeping the reasons fixes it.
  • The description's Size line (+244 / −31) and its Device heading ("this head") describe the previous commit; this commit is +274 / −31 over 11 files, and the device run predates it, so please update both lines.
  • Miss: the Primary intent's "so no tooltip covers text someone starts to type" holds only while the tooltip is shut, since an open tooltip now stays open through a field tap (as the Fix section says), so please end that sentence at "only focuses the field".

Non-blocking: the new Tooltip FR5 sentence lists input, textarea and contenteditable, but a tap on a field's <label> inside the trigger is treated as a field tap too, so adding "or a label for one" would make the record say what ships. CI has not run on this draft commit, and since the pull request changes spec records, the commit with the fixes needs a fresh /approve-spec.

Claims and files checked
  • Title: on Android the first tap on a button or link in truncated text opens its tooltip, and a tap on a text field never does: verified (TruncationTooltip.tsx:147-155, useTouchTrigger.ts:570-578; Text.test.tsx:705, :716, :760).
  • Changeset: the first tap on a button or link inside truncated Text or Heading opens the tooltip, as on iOS: verified (TruncationTooltip.tsx:147-155; Text.test.tsx:705).
  • Changeset: the tap's own focus used to take the tap, and now only a keyboard focus counts: verified (TruncationTooltip.tsx:148-152, useTouchTrigger.ts:160-161).
  • Changeset: a tap on a text field inside a tooltip's trigger focuses it and no longer opens or closes the tooltip: verified (useTouchTrigger.ts:570-578, useTooltip.tsx:416; Tooltip.test.tsx:478-506).
  • Changeset: this includes a text field inside truncated text: verified (Text.test.tsx:716, :760).
  • Description: a field tap only focuses the field, so no tooltip covers text being typed: false for a tooltip that is already open, which a field tap now leaves open (Tooltip.test.tsx:498-505) (finding).
  • Description: Android first taps on buttons and links now open the tooltip where only a second tap did: verified in code (the base hold took the press's focus and then ignored the click).
  • Description: a field tap neither opens nor closes the tooltip on any tap, where a mounted tooltip opened over it: verified (Text.test.tsx:760; Tooltip.test.tsx:478-506).
  • Description: keyboard users are unchanged, and Tab inside clamped text mounts the tooltip without opening it: verified (Text.test.tsx:671, :799).
  • Description: no API change: verified (Layer/index.ts exports unchanged; useTouchTrigger.ts:410 passes no new argument).
  • Description: the three-step cause, with iOS unaffected: verified in code (the mounted Tooltip opens on focus only for :focus-visible focus outside a touch interaction).
  • Description: the hold keeps only a keyboard focus, read from :focus-visible and a recognizer flag that holds only while a touch or pen press waits for its tap with no key or new press since: verified (TruncationTooltip.tsx:147-155, useTouchTrigger.ts:136-161).
  • Description: a field tap leaves an open tooltip open while the keyboard rises: verified (Tooltip.test.tsx:498-505).
  • Description: the shared text-entry check means a tap on a field's label counts too: verified (keyboardHeight.ts:346-350); the record sentence does not name labels (non-blocking).
  • Description: a disabled field keeps its reason's tap, and a trigger that is itself a field keeps its own: verified (useTouchTrigger.ts:573-575).
  • Description: the rule rides an internal argument only the Tooltip hook passes, so HoverCard keeps its tap: verified (useTooltip.tsx:416, useTouchTrigger.ts:410; HoverCard.test.tsx:1743).
  • Description: this covers truncated text's first tap, because that tap reaches the mounted Tooltip's rule: verified (the mounted Tooltip answers a held tap through its tap answer).
  • Description: the kind checks read element names, and the focus check works across windows: verified (keyboardHeight.ts:306-350, TruncationTooltip.tsx:148).
  • Description: no new module, no new import crossing and no Effect: verified (Layer already imports the keyboard module in useLayerKeyboardClearance.ts).
  • Description: the quoted Tooltip, Text and Heading record sentences: verified (Tooltip.spec.md:179, Text.spec.md:165-168, Heading.spec.md:165-168).
  • Description: the Android behavior was ruled a correction: taken as stated; an engineering owner approved the records for this commit.
  • Description: the red-first tests fail before the fix and pass after it: consistent with the code paths; not rerun.
  • Description: the suites pass, lint has 0 errors and the import-boundary check passes: not rerun; CI's strict lint reports the two citations as errors (finding).
  • Description: Pixel and iPhone results: taken as stated; recorded on the previous commit, which the Device heading calls this head (finding).
  • Description: +244 / −31 lines: false; this commit is +274 / −31 (finding). TruncationTooltip.tsx +16 / −1: verified.
  • Description: about +0.2 KB gzip for Text, Heading, Button and Link: not checked; CI produced no size report for this commit.
  • Description: one primary intent, and no internal context in public text: verified.
  • Files: .changeset/text-tooltip-android-first-tap.md clear; docs/specs/components/Heading/Heading.spec.md clear; docs/specs/components/Text/Text.spec.md clear; docs/specs/components/Tooltip/Tooltip.spec.md clear (non-blocking label wording); packages/core/src/HoverCard/HoverCard.test.tsx clear; packages/core/src/Layer/useTouchTrigger.ts finding; packages/core/src/Text/Text.test.tsx clear; packages/core/src/Text/TruncationTooltip.tsx clear; packages/core/src/Tooltip/Tooltip.test.tsx clear; packages/core/src/Tooltip/useTooltip.tsx clear; packages/core/src/keyboard/keyboardHeight.ts clear.

Automated review (maintainer link)

| FR3 | On a hover-capable pointer, entering the trigger opens after `delay` ms; leaving closes after `hideDelay` ms. With `hideDelay` 0 a short bridge lets the pointer move onto the surface without closing it, and the surface stays open while hovered. | WCAG 1.4.13; tests |
| FR4 | Focus that a closing menu or other layer returns to its trigger after a pointer pick is pointer focus, so it opens no tooltip on that trigger (`architecture:interaction-modality` INV1). Focus that matches `:focus-visible` opens the tooltip per `focusTrigger`: keyboard focus, programmatic focus that follows keyboard input (AR4), pointer focus on a text-entry trigger, which browsers mark focus-visible, and programmatic focus on a text-entry trigger unless a finger or pen pressed that trigger and the last input was a pointer press, and on any other trigger unless the last input was a pointer (after keyboard input, as in AR4, or before any input). Implementation gap: script focus after a pointer press that focused nothing opens it, because the hook reads `:focus-visible` alone (Current-state impact). Focus a tap leaves behind, and other pointer focus, does not. Focus leaving the trigger schedules the hide as a pointer leave does. Under `focusTrigger="auto"`, focus opens the tooltip on any focusable trigger, judged when focus arrives. | Current source and tests |
| FR5 | On touch and pen, a completed tap opens the tooltip per `touchTrigger` when the finger lifts; a touch that becomes a scroll, or a press the browser does not count as a tap, does not open it. Under `auto`, a tap opens it unless the trigger itself performs an action; an `aria-disabled` control, or a label for a disabled control, is not an action, so a disabled control's reason opens on a tap, even inside a clickable row or card (DEC-1). Under `tap`, every tap opens it; under `none`, no tap does. A second tap on the trigger, a tap outside, or a scroll starting outside closes it. On a button that pins through `show()`, the button's click decides what a tap does (FR9). Whether `auto` also leaves the tooltip shut when the tap acts on a control around the trigger is open (OQ1). | Current source and tests |
| FR5 | On touch and pen, a completed tap opens the tooltip per `touchTrigger` when the finger lifts; a touch that becomes a scroll, or a press the browser does not count as a tap, does not open it. Under `auto`, a tap opens it unless the trigger itself performs an action; an `aria-disabled` control, or a label for a disabled control, is not an action, so a disabled control's reason opens on a tap, even inside a clickable row or card (DEC-1). Under `tap`, every tap opens it; under `none`, no tap does. A tap on a text-entry control inside the trigger (input, textarea, contenteditable) focuses that control and does not open or close the tooltip. A second tap on the trigger, a tap outside, or a scroll starting outside closes it. On a button that pins through `show()`, the button's click decides what a tap does (FR9). Whether `auto` also leaves the tooltip shut when the tap acts on a control around the trigger is open (OQ1). | Current source and tests |

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.

Miss (non-blocking): the code also treats a tap on a <label> for such a field inside the trigger as a tap on the field (findTextEntryControl, keyboardHeight.ts:345-350), so under tap that label tap opens nothing, while this row's "Under tap, every tap opens it" says it opens. Adding "or a label for one" after "(input, textarea, contenteditable)" would make the record say what ships.

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 6fcc1c1

@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. The Android first-tap fix for buttons and links in truncated Text and Heading, the Tooltip text-field rule and the new Text, Heading and Tooltip record sentences hold up, and CI passed on this commit.

Non-blocking, both already open as inline comments:

  • The Tooltip FR5 sentence lists input, textarea and contenteditable, but a tap on a field's <label> inside the trigger is also treated as a field tap, so adding "or a label for one" would make the record say what ships.
  • The JSDoc reason at packages/core/src/Layer/useTouchTrigger.ts:435-437 ("so no tooltip covers text the person starts to type") holds only while the tooltip is closed, because an open tooltip stays open through a field tap.
Claims and files checked
  • Title: on Android, the first tap on a button or link inside truncated text opens its tooltip: verified (TruncationTooltip.tsx:144-158; Text.test.tsx:703).
  • Title: a tap on a text field never opens it: verified (useTouchTrigger.ts:571-580; Text.test.tsx:703, :760; Tooltip.test.tsx:478).
  • Changeset: the first tap on a button or link inside truncated Text or Heading opens the tooltip, as on iOS: verified (Heading shares the hold through Heading.tsx:49-51; Text.test.tsx:703).
  • Changeset: the tap's own focus used to take the tap, and now only a keyboard focus counts: verified (TruncationTooltip.tsx:147-152; useTouchTrigger.ts:160-161).
  • Changeset: a tap on a text field inside a tooltip's trigger focuses it and no longer opens or closes the tooltip: verified (useTouchTrigger.ts:571-580; useTooltip.tsx:416; Tooltip.test.tsx:478-506).
  • Changeset: this includes a text field inside truncated text: verified (Text.test.tsx:760).
  • Description: before the fix, the Android first tap opened nothing and only a second tap did: verified from the base code (the hold took the press's focus, mounted the tooltip shut and dropped the click; the mounted tooltip answers the next tap).
  • Description: a field tap neither opens nor closes the tooltip on any tap, where before a mounted tooltip opened over the field: verified (Text.test.tsx:760; the base tap rule toggled under auto).
  • Description: keyboard users are unchanged, and Tab inside clamped text mounts the tooltip without opening it: verified (Text.test.tsx:671, :799).
  • Description: no API change: verified (Layer/index.ts unchanged; CI's API comparison lists no rows).
  • Description: the three-step cause, with iOS unaffected: verified in code.
  • Description: the hold keeps only a :focus-visible focus that is not a pending touch or pen press's own, read from the existing recognizer and gesture counter: verified (TruncationTooltip.tsx:144-158; useTouchTrigger.ts:160-161; gestureCounter.ts:89-91).
  • Description: an open tooltip stays open while the keyboard rises: verified that a field tap leaves it open (Tooltip.test.tsx:498-505).
  • Description: a tap on a field's label counts too: verified (keyboardHeight.ts:347-351); the record sentence does not name labels (non-blocking).
  • Description: a disabled field keeps its reason's tap, and a trigger that is itself a field keeps its own: verified (useTouchTrigger.ts:571-580).
  • Description: only the Tooltip hook passes the new argument, so HoverCard keeps its tap: verified (useTooltip.tsx:416; useHoverCard.tsx:362; HoverCard.test.tsx:1743).
  • Description: truncated text's first tap reaches the mounted Tooltip's rule: verified (useTooltip.tsx:808-809).
  • Description: the element-kind checks read names, so a field in another window counts, and the focus check works across windows: verified (keyboardHeight.ts:306-351; TruncationTooltip.tsx:148).
  • Description: no new module, no new import crossing and no Effect: verified (no added file; Layer already imports the keyboard module; no Effect in the diff; lint passed).
  • Description: the quoted Tooltip, Text and Heading record sentences: verified (Tooltip.spec.md:179; Text.spec.md:165-168; Heading.spec.md:165-168).
  • Description: the Android behavior was ruled a correction: the records carry an engineering owner's approval for this commit.
  • Description: the red-first tests fail before their fix and pass after it: consistent with the base code paths; not rerun.
  • Description: the suites pass, lint has 0 errors and the import-boundary check passes: CI's tests, lint and typecheck passed on this commit.
  • Description: the Pixel and iPhone results: taken as stated.
  • Description: +275 / -31 over 11 files, and TruncationTooltip.tsx +16 / -1: verified.
  • Description: about +0.2 KB gzip for Text, Heading, Button and Link: verified against CI's size analysis (+0.20 to +0.27 KB).
  • Description: one primary intent, and no internal context in public text: verified.
  • Files: .changeset/text-tooltip-android-first-tap.md clear; docs/specs/components/Heading/Heading.spec.md clear; docs/specs/components/Text/Text.spec.md clear; docs/specs/components/Tooltip/Tooltip.spec.md non-blocking (label wording); packages/core/src/HoverCard/HoverCard.test.tsx clear; packages/core/src/Layer/useTouchTrigger.ts non-blocking (JSDoc reason); packages/core/src/Text/Text.test.tsx clear; packages/core/src/Text/TruncationTooltip.tsx clear; packages/core/src/Tooltip/Tooltip.test.tsx clear; packages/core/src/Tooltip/useTooltip.tsx clear; packages/core/src/keyboard/keyboardHeight.ts clear.

Automated review (maintainer link)

*/
onReleaseInLayer?: () => void,
/**
* Whether a tap on a text-entry control inside the trigger only focuses

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.

Non-blocking: this reason holds only while the tooltip is shut. An open tooltip stays open through a field tap (Tooltip.test.tsx:498-505), so it can still cover the field. A version that holds in both states:

/**
 * Whether a tap on a text-entry control inside the trigger only focuses
 * that control. The tooltip stays as it is. Only useTooltip passes it.
 */

@cixzhang
cixzhang marked this pull request as ready for review November 12, 2026 09:49
@cixzhang

Copy link
Copy Markdown
Contributor Author

Decision: D-20261112-304

This branch was successfully deployed

1 active deployment
Preview — 6fcc1c15 Deployed Nov 12, 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 A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant