Skip to content

fix(FieldLabel): a tap on the label's info icon opens its help without activating the control - #9089

Merged
cixzhang merged 6 commits into
meta:mainfrom
vjeux:feat/fieldlabel-info-icon-tap
Oct 31, 2026
Merged

cixzhang merged 6 commits into
meta:mainfrom
vjeux:feat/fieldlabel-info-icon-tap

Conversation

@vjeux

@vjeux vjeux commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

User need

On a touch screen, a tap on a field label's info icon (labelTooltip) opens its help and also activates the label's control, because the icon sits inside the <label>. In Chromium with touch, a tap on the info icon of the "Nickname" label opens the help and focuses the field, which on a phone raises the keyboard. Beside a Switch, the tap that opens "Automatically save your changes as you work" also turns auto-save on. Asking what a setting does should not change it.

Problem and solution fit

  • Why it occurs: a tap anywhere inside a native <label>, the icon included, activates the label's control.
  • Why it harms the task: the help and the activation arrive together, so reading about a setting changes it, or moves focus to a field the person did not choose.
  • Why that matters: the person has to undo a change they never asked for, and may not notice it.

The icon's tooltip opens or closes on a tap (touchTrigger="tap"), and a tap by finger or pen stops at the help: its click does not go on to the label. A mouse click on the icon keeps native label activation, and hover still shows the help.

Current specification

This is a caller-compatible behavior change that FieldLabel's DEC-1 decides, a patch [feat] under spec:AST-017 FR7: a tap on the info icon opens the help without also toggling or focusing the control, the unintended second action FR9 removes. component:FieldLabel lets people "activate eligible controls from the complete visible label area"; this pull request amends that record with FR9 and DEC-1, which give a tap on the info icon to the help, and with the matching end-user impact, tooltip concept, compatibility and verification rows. The amendment needs the record owner's approval.

Public delta and caller burden

  • On touch, a tap on the info icon opens the help without focusing the field or toggling the control. Mouse, hover and keyboard behavior are unchanged.
  • No prop, type, default, export or DOM change: callers decide nothing new.
  • The changeset is a patch [feat] under spec:AST-017 FR7; it names the old and new tap.
  • The labelTooltip docs of FieldLabel (English and Chinese) and Field describe hover and tap.

Design and alternatives

Evidence

  • Chromium, Core/FieldLabel States story, the Nickname field. With touch, on main a tap on the info icon opens the help and focuses the field; with this change it opens the help, and focus stays off the field. With a mouse, on both, hover shows the help and a click focuses the field. FieldLabelTap.a11y.chromium.spec.ts checks the tap and the click.
  • Unit tests: a finger tap and a pen tap on the icon open the help and leave a checkbox unchecked, and a mouse click on the icon toggles the checkbox. With main's FieldLabel.tsx, the finger-tap and pen-tap cases fail; with every click on the icon cancelled, the mouse case fails.
  • iOS simulator, main above and this pull request below: the tap opens the help, and on main it also turns the switch on.

Label icon tap: main above, this pull request below

Scope

  • One capability is added.
  • Unrelated fixes, cleanup, and policy changes were removed or split.
  • Consumer docs, focused tests, and migration evidence ship with the feature.
  • Public text and artifacts contain no internal Meta context.

Writing rubric results

FieldLabel.spec.md:

  • R1 narration: none; FR9 and DEC-1 state what the label does.
  • R2 research in the record: none.
  • R3 evidence naming a change: none; FR9's verification names its test cases.
  • R4 rejected alternatives over one line or outside a decision: one, inside DEC-1, one line.
  • R5 pull request or issue references remaining: none.
  • R6 ruled open questions still listing options: none; OQ1 is unanswered and unchanged.

Testing

Local gates at 0a6a60f (on main 560c666):

…ut activating the control

On a touch screen, the tap on FieldLabel's info icon (labelTooltip) that
opened the help also activated the label's control: it focused the field,
raising the keyboard, or toggled the switch or checkbox. The icon's
tooltip opens on every tap (touchTrigger="tap"), and a tap by finger or
pen stops at the help. A mouse click on the icon keeps native label
activation, and hover shows the help.

The FieldLabel record gains FR9 and DEC-1 for the tap, and the
labelTooltip docs describe hover and tap.
@vercel

vercel Bot commented Oct 31, 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 Oct 31, 2026 5:59pm UTC

Request Review

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

astracat-bot Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Oct 31, 2026, 6:07 PM UTC

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

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

Preview availability: this branch's preview address cannot be known in advance; open the preview from Vercel's comment on this pull request.

Component Size

Component Import before Import after Delta CSS before CSS after Delta
charts/Chart N/A 64.9KB N/A N/A 20B N/A
charts/ChartLegend N/A 54.3KB N/A N/A 20B N/A
charts/ChartTooltip N/A 54.3KB N/A N/A 20B N/A
core/AlertDialog 58.1KB 58.1KB 0B 12.6KB 12.6KB 0B
core/AppShell 67.6KB 67.6KB 0B 11.8KB 11.8KB 0B
core/Avatar 38.0KB 38.0KB 0B 6.4KB 6.4KB 0B
core/AvatarGroup 40.4KB 40.4KB 0B 6.5KB 6.5KB 0B
core/AvatarGroupOverflow 41.3KB 41.3KB 0B 6.4KB 6.4KB 0B
core/Banner 49.3KB 49.3KB 0B 10.1KB 10.1KB 0B
core/BaseTypeahead 55.9KB 55.9KB 0B 10.1KB 10.1KB 0B
core/BreadcrumbItem 68.6KB 68.6KB 0B 11.3KB 11.3KB 0B
core/Button 44.6KB 44.6KB 0B 9.3KB 9.3KB 0B
core/Calendar 56.4KB 56.4KB 0B 10.2KB 10.2KB 0B
core/Carousel 51.9KB 51.9KB 0B 10.4KB 10.4KB 0B
core/ChatComposer 62.3KB 62.3KB 0B 11.0KB 11.0KB 0B
core/ChatComposerInput 57.1KB 57.1KB 0B 10.2KB 10.2KB 0B
core/ChatComposerTokenElement 57.1KB 57.1KB 0B 10.2KB 10.2KB 0B
core/ChatDictationButton 48.0KB 48.0KB 0B 9.6KB 9.6KB 0B
core/ChatLayout 50.5KB 50.5KB 0B 10.1KB 10.1KB 0B
core/ChatLayoutScrollButton 48.0KB 48.0KB 0B 9.8KB 9.8KB 0B
core/ChatMessageList 29.4KB 29.4KB 0B 7.8KB 7.8KB 0B
core/ChatSendButton 47.3KB 47.3KB 0B 9.3KB 9.3KB 0B
core/ChatToolCalls 32.5KB 32.5KB 0B 9.1KB 9.1KB 0B
core/CheckboxInput 51.5KB 51.5KB +90B 9.5KB 9.5KB 0B
core/CheckboxList 46.8KB 46.8KB +69B 8.4KB 8.4KB 0B
core/CheckboxListItem 55.9KB 56.0KB +64B 10.8KB 10.8KB 0B
core/CodeBlock 61.6KB 61.6KB 0B 10.9KB 10.9KB 0B
core/CommandPalette 53.1KB 53.1KB 0B 12.0KB 12.0KB 0B
core/CommandPaletteInput 32.9KB 32.9KB 0B 8.3KB 8.3KB 0B
core/ComplexSelector 57.4KB 57.5KB +73B 10.8KB 10.8KB 0B
core/ContextMenu 76.2KB 76.3KB +75B 15.1KB 15.1KB 0B
core/DateInput 101.3KB 101.4KB +74B 15.0KB 15.0KB 0B
core/DateRangeInput 71.2KB 71.3KB +64B 11.4KB 11.4KB 0B
core/DateTimeInput 111.4KB 111.5KB +96B 15.4KB 15.4KB 0B
core/DialogHeader 50.4KB 50.4KB 0B 10.0KB 10.0KB 0B
core/DrawerHeader 50.5KB 50.5KB 0B 11.4KB 11.4KB 0B
core/DropdownMenu 74.2KB 74.2KB +6B 15.2KB 15.2KB 0B
core/DropdownMenuSubMenu 59.9KB 59.9KB 0B 9.8KB 9.8KB 0B
core/Field 44.9KB 45.0KB +68B 8.1KB 8.1KB 0B
core/FieldLabel 39.1KB 39.2KB +91B 5.9KB 5.9KB 0B
core/FileInput 55.7KB 55.8KB +65B 10.5KB 10.5KB 0B
core/Heading 7.7KB 7.7KB 0B 5.9KB 5.9KB 0B
core/HoverCard 17.3KB 17.3KB 0B 4.9KB 4.9KB 0B
core/IconButton 44.6KB 44.6KB 0B 9.3KB 9.3KB 0B
core/InputGroup 45.5KB 45.6KB +92B 8.2KB 8.2KB 0B
core/LayerProvider 65.0KB 65.0KB 0B 10.3KB 10.3KB 0B
core/Lightbox 52.8KB 52.8KB 0B 10.0KB 10.0KB 0B
core/Link 45.1KB 45.1KB 0B 7.8KB 7.8KB 0B
core/ListItem 55.3KB 55.4KB +71B 10.8KB 10.8KB 0B
core/Markdown 146.4KB 146.5KB +74B 18.0KB 18.0KB 0B
core/MobileNav 52.6KB 52.6KB 0B 10.2KB 10.2KB 0B
core/MobileNavToggle 47.8KB 47.8KB 0B 9.6KB 9.6KB 0B
core/MoreMenu 74.5KB 74.5KB +3B 15.2KB 15.2KB 0B
core/MultiSelector 74.3KB 74.4KB +73B 14.8KB 14.8KB 0B
core/NumberInput 57.3KB 57.4KB +61B 10.9KB 10.9KB 0B
core/Pagination 86.6KB 86.7KB +53B 15.6KB 15.6KB 0B
core/Popover 51.1KB 51.1KB 0B 12.2KB 12.2KB 0B
core/PowerSearch 168.2KB 168.2KB +74B 20.1KB 20.1KB 0B
core/ProgressBar 7.8KB 7.8KB 0B 6.6KB 6.6KB 0B
core/RadioList 46.3KB 46.4KB +84B 8.2KB 8.2KB 0B
core/RadioListItem 53.9KB 54.0KB +67B 9.9KB 9.9KB 0B
core/SegmentedControl 39.3KB 39.3KB 0B 6.3KB 6.3KB 0B
core/Selector 78.3KB 78.3KB +67B 15.3KB 15.3KB 0B
core/SideNav 65.6KB 65.6KB 0B 10.7KB 10.7KB 0B
core/SideNavCollapseButton 48.2KB 48.2KB 0B 9.6KB 9.6KB 0B
core/SideNavHeading 60.1KB 60.1KB 0B 10.4KB 10.4KB 0B
core/SideNavItem 56.2KB 56.2KB 0B 10.3KB 10.3KB 0B
core/Slider 49.2KB 49.3KB +78B 8.7KB 8.7KB 0B
core/Spinner 25.3KB 25.3KB 0B 6.7KB 6.7KB 0B
core/StatusDot 19.1KB 19.1KB 0B 6.2KB 6.2KB 0B
core/Stepper 49.0KB 49.0KB 0B 9.8KB 9.8KB 0B
core/Switch 49.8KB 49.9KB +78B 9.5KB 9.5KB 0B
core/TabMenu 56.8KB 56.8KB 0B 10.3KB 10.3KB 0B
core/Table 85.9KB 86.0KB +51B 15.8KB 15.8KB 0B
core/TableCell 77.5KB 77.5KB +59B 15.5KB 15.5KB 0B
core/TableHeaderCell 77.1KB 77.1KB +49B 15.3KB 15.3KB 0B
core/TableSelectionToolbar 53.7KB 53.7KB 0B 11.3KB 11.3KB 0B
core/Text 7.2KB 7.2KB 0B 5.9KB 5.9KB 0B
core/TextArea 50.1KB 50.2KB +74B 9.6KB 9.6KB 0B
core/TextInput 55.1KB 55.2KB +88B 10.6KB 10.6KB 0B
core/Thumbnail 52.2KB 52.2KB 0B 11.2KB 11.2KB 0B
core/TimeInput 88.8KB 88.9KB +73B 13.9KB 13.9KB 0B
core/Timer 9.3KB 9.3KB 0B 6.8KB 6.8KB 0B
core/Timestamp 27.9KB 27.9KB 0B 9.7KB 9.7KB 0B
core/Toast 61.4KB 61.4KB 0B 9.9KB 9.9KB 0B
core/ToggleButton 45.4KB 45.4KB 0B 9.4KB 9.4KB 0B
core/Tokenizer 70.1KB 70.2KB +88B 16.7KB 16.7KB 0B
core/Tooltip 17.0KB 17.0KB 0B 4.9KB 4.9KB 0B
core/TopNav 53.5KB 53.5KB 0B 10.5KB 10.5KB 0B
core/TopNavHeading 59.5KB 59.5KB 0B 10.2KB 10.2KB 0B
core/TopNavMegaMenu 55.9KB 55.9KB 0B 11.0KB 11.0KB 0B
core/TopNavMenu 59.2KB 59.2KB 0B 10.3KB 10.3KB 0B
core/Typeahead 63.1KB 63.2KB +86B 11.5KB 11.5KB 0B
lab/ChatEmojiPicker N/A 67.0KB N/A N/A 773B N/A
lab/ChatReactionBar N/A 67.6KB N/A N/A 1.1KB N/A
lab/CommentComposer N/A 95.8KB N/A N/A 1.9KB N/A
lab/CommentPin N/A 48.9KB N/A N/A 1.2KB N/A
lab/CommentThread N/A 218.4KB N/A N/A 2.4KB N/A
lab/Comments N/A 222.9KB N/A N/A 2.5KB N/A
lab/EmojiPicker N/A 65.0KB N/A N/A 722B N/A
lab/InfoTip N/A 22.1KB N/A N/A 458B N/A
lab/ListInput N/A 76.8KB N/A N/A 1.6KB N/A
lab/MobilePowerSearch N/A 155.0KB N/A N/A 1.2KB N/A
lab/MobileTokenizer N/A 94.3KB N/A N/A 880B N/A
lab/Schedule N/A 61.6KB N/A N/A 3.9KB N/A
lab/TourStep N/A 56.4KB N/A N/A 590B N/A
lab/TransferList N/A 68.9KB N/A N/A 1.7KB N/A
lab/TransferListSelector N/A 74.4KB N/A N/A 1.9KB N/A
richtext/RichTextEditor N/A 271.7KB N/A N/A 2.6KB N/A
richtext/RichTextEditorToolbar N/A 214.5KB N/A N/A 454B N/A
richtext/RichTextView N/A 252.1KB N/A N/A 2.3KB N/A

Sizes are gzip. Import counts the JavaScript the import loads eagerly; CSS counts the package stylesheet rules referenced by the modules it can load from its own package, lazily loaded ones included.

Bundle Size Summary

Gzip figures measure each package's entry file, not the code an import pulls in.

Package Entry (ESM) Entry gzip before Entry gzip after Delta
@astryxdesign/core 4.9KB 1.2KB 1.2KB 0B
Package stylesheet Gzip before Gzip after Delta
@astryxdesign/core 35.6KB 35.6KB 0B

Accessibility Audit

Status: The accessibility audit did not run on this pull request. It runs after merges to main and before each release; pull requests that touch components run it with the ci:heavy-lanes label.


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.

Approval waits on an engineering owner's decision on the new FR9 and DEC-1 in the FieldLabel record. The question is whether a finger or pen tap on the label's info icon may open its help without activating the control, an exception to the record's "activate eligible controls from the complete visible label area". An engineering owner, the author included if they are one, records that decision by commenting /approve-spec <full head SHA> on this pull request. Two fixes are needed either way:

  • FR9 says the help opens "on every tap", but a second tap closes it, as the Tooltip's touch rules state; reword FR9 to defer to those rules.
  • FR9's verification row counts the text-field case as proof that a tap leaves the field unfocused, but that test passes even without the fix; add a real-browser touch check, or record the focus half as a gap.

[Automated review]

| FR6 | Accepted data, ARIA, DOM, class, style, event, and `xstyle` inputs compose on the label element without replacing the component-owned target or association. When a description renders, the outer wrapper is layout-only and caller props stay on the inner label element. | `architecture:public-component-api/INV5–INV7` |
| FR7 | The public ref and label-element props MUST describe the element FieldLabel renders in each mode; which root element and public type group mode uses is OQ1. Implementation gap: group mode renders a `<span>` while the public BaseProps and ref types are fixed to `HTMLLabelElement`. | `architecture:public-component-api/INV8,INV9`; current runtime/types |
| FR8 | The optional tooltip's explanatory content MUST be reachable by keyboard (WCAG 2.2 SC 2.1.1) and its trigger MUST have an accessible name and role (WCAG 2.2 SC 4.1.2). Implementation gap: it anchors to an anonymous, nonfocusable info icon, so the content is pointer-only. | WCAG 2.2 SC 2.1.1, SC 4.1.2; `spec:AST-020/FR1` |
| FR9 | A tap on the tooltip's info icon, by finger or pen, opens the tooltip on every tap (`touchTrigger="tap"`) and does not activate the associated control. A mouse click on the icon activates the control like the rest of the label, and hover shows the tooltip. | DEC-1 |

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.

A second tap on the icon closes the help: Tooltip's touch rules close a tap-opened tooltip on the next tap, and that is what the component does. "Opens the tooltip on every tap" describes behavior it does not have. Suggest: a finger or pen tap opens or closes the tooltip as Tooltip's touch rules state under touchTrigger="tap", and does not activate the associated control.

| FR6, ORD2 | `FieldLabel.test.tsx` ref, layout-item, and label-target cases; `themingTargets.test.ts` | Ref; composed target; with a description wrapper | A dropped ref or a lost `field-label` target fails; a rendered class absent from the documented targets fails. Evidence gap: no test asserts caller class, style, `xstyle`, data, and event props on the inner label element with a description wrapper. | `audit:FieldLabel/api` |
| FR7 | Evidence gap: no type test pins the public ref and props against the rendered group span | — | — | `audit:FieldLabel/api` |
| FR8, AR5 | `FieldLabelAudit.a11y.chromium.spec.ts` tooltip-anchor count | Tooltip present | The audit records the one anonymous, nonfocusable anchor; it changes when the FR8 gap closes. | `audit:FieldLabel/accessibility` |
| FR9 | `FieldLabel.test.tsx` finger-tap, pen-tap, and mouse-click info-icon cases | Checkbox; text field | A tap that toggles or focuses the control, or a mouse click that does not toggle it, fails. | `audit:FieldLabel/accessibility` |

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.

The text-field case cannot fail: it passes with main's FieldLabel.tsx and with the preventDefault() removed, because jsdom's label activation never focuses a text input. Either add a real-browser touch check that focus stays off the field, or record the focus half of FR9 as an evidence gap here.

@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec ca6ffbf

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Oct 31, 2026
vjeux added 2 commits October 31, 2026 08:09
spec:AST-017 DEC-17 counts a change to documented touch activation as
breaking, so the changeset bumps the minor, names the old tap (it also
activated the label's control) and how to get it back: an info icon
rendered through labelIcon with its own Tooltip, whose tap opens the
help and activates the control.
spec:AST-017 FR53 classifies an accessibility behavior fix as a patch
[fix], even when it replaces documented interaction: the label's help
becomes reachable on touch as its own interaction, the operable path
architecture:interaction-modality INV4 asks of every modality, and no
caller needs a code change. The changeset names the old and new tap and
that target.
@vjeux vjeux changed the title feat(FieldLabel): a tap on the label's info icon opens its help without activating the control fix(FieldLabel): a tap on the label's info icon opens its help without activating the control Oct 31, 2026
@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec b08a560

@cixzhang cixzhang added the ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) label Oct 31, 2026
@cixzhang
cixzhang marked this pull request as ready for review October 31, 2026 15:19

@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 touch behavior works as described and the FR9/DEC-1 spec decision is approved, but four fixes are needed first. Rewording FR9 changes the spec record, so an engineering owner re-approves it by commenting /approve-spec <full head SHA> on the new head (the author may do so as an engineering owner).

  • Extend useTouchTrigger to cancel the tap's label activation instead of copying its touch-pointer set and press tracking into FieldLabel.
  • Reword FR9, which says the help opens "on every tap" although a second tap closes it as the Tooltip's touch rules state.
  • Add a real-browser check that a tap leaves the text field unfocused, because the jsdom text-field test passes even without the fix.
  • Name the accessibility target in the [fix] changeset as the release rules require, or tag it as an owner-decided behavior change.

[Automated review]

Comment thread packages/core/src/Field/FieldLabel.tsx Outdated
* The pointers whose tap opens the label's help (`touchTrigger="tap"`): a
* finger and a pen, the same ones the shared touch trigger answers.
*/
const TAP_POINTER_TYPES = new Set(['touch', 'pen']);

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.

This is a copy of TOUCH_POINTER_TYPES in Layer/useTouchTrigger.ts:64, and the press tracking below repeats what useTouchTrigger's handlePointerDown already does on this same icon. Extending useTouchTrigger to cancel the tap's default activation under touchTrigger="tap" would let FieldLabel drop both.

| FR6 | Accepted data, ARIA, DOM, class, style, event, and `xstyle` inputs compose on the label element without replacing the component-owned target or association. When a description renders, the outer wrapper is layout-only and caller props stay on the inner label element. | `architecture:public-component-api/INV5–INV7` |
| FR7 | The public ref and label-element props MUST describe the element FieldLabel renders in each mode; which root element and public type group mode uses is OQ1. Implementation gap: group mode renders a `<span>` while the public BaseProps and ref types are fixed to `HTMLLabelElement`. | `architecture:public-component-api/INV8,INV9`; current runtime/types |
| FR8 | The optional tooltip's explanatory content MUST be reachable by keyboard (WCAG 2.2 SC 2.1.1) and its trigger MUST have an accessible name and role (WCAG 2.2 SC 4.1.2). Implementation gap: it anchors to an anonymous, nonfocusable info icon, so the content is pointer-only. | WCAG 2.2 SC 2.1.1, SC 4.1.2; `spec:AST-020/FR1` |
| FR9 | A tap on the tooltip's info icon, by finger or pen, opens the tooltip on every tap (`touchTrigger="tap"`) and does not activate the associated control. A mouse click on the icon activates the control like the rest of the label, and hover shows the tooltip. | DEC-1 |

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.

"opens the tooltip on every tap" contradicts component:Tooltip FR5, under which a second tap on the trigger closes it (and it does, in Chromium on this head). Suggest: the tap opens or closes the tooltip as Tooltip FR5 states for touchTrigger="tap", and does not activate the associated control.

expect(screen.getByRole('checkbox')).not.toBeChecked();
});

it('opens the help on a tap of its icon without focusing the field', async () => {

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.

This case passes with main's FieldLabel.tsx and with the preventDefault() removed, because jsdom's label activation never focuses a text input, so it cannot back the focus half of FR9's verification row.

Comment thread .changeset/fieldlabel-info-icon-tap.md Outdated
'@astryxdesign/core': patch
---

[fix] FieldLabel: a tap on the label's info icon (`labelTooltip`) opens its help without activating the control. Before, the tap that opened the help also activated the label's control, as a tap anywhere on a native label does: on a touch screen it focused the field, raising the keyboard, or toggled the switch or checkbox the label names. Now a tap by finger or pen stops at the help, so touch reaches the help as its own interaction, as every input modality should; a mouse click on the icon still activates the control like the rest of the label, and hover still shows the help.

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.

An accessibility [fix] under AST-017 FR53 names the accessibility target it serves (other changesets cite the WCAG criterion or record clause); this one names none, and touch could already reach the help on main.

…nd the changeset's target

- FR9 and DEC-1 say a tap opens or closes the help as component:Tooltip
  FR5 states under touchTrigger="tap", instead of opening it on every tap.
- FieldLabelTap.a11y.chromium.spec.ts checks in Chromium that a touch tap
  on the info icon shows the help and leaves the text field unfocused,
  and that a mouse click focuses it. The jsdom text-field case, which
  could not fail, goes.
- FieldLabel takes its tap pointers from useTouchTrigger's
  TOUCH_POINTER_TYPES instead of a copy.
- The [fix] changeset names its accessibility target,
  architecture:interaction-modality INV4.
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Oct 31, 2026
@vjeux

vjeux commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

Fixed in 0a6a60f:

  1. FieldLabel takes its tap pointers from useTouchTrigger's TOUCH_POINTER_TYPES instead of a copy. The cancel stays in FieldLabel under its own FR9: a Tooltip-level rule for every touchTrigger="tap" trigger inside a label belongs to the tap strategy now with the Tooltip and HoverCard owner, so changing Tooltip, HoverCard and Layer here would pre-empt that answer.
  2. FR9 and DEC-1 say a tap opens or closes the help as component:Tooltip FR5 states under touchTrigger="tap".
  3. FieldLabelTap.a11y.chromium.spec.ts checks in Chromium that a touch tap shows the help and leaves the text field unfocused, and that a mouse click focuses it. The jsdom text-field case is gone.
  4. The changeset names its accessibility target, architecture:interaction-modality INV4.

FR9 changed, so the record needs /approve-spec on the new head.

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

Approval waits on an engineering owner's decision on FieldLabel FR9 and DEC-1 as reworded in the latest push: a finger or pen tap on the label's info icon opens or closes its help without activating the control, an exception to the record's "activate eligible controls from the complete visible label area". The earlier approval covered the previous FR9 wording, so an engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request; the author may do so as an engineering owner. One fix is needed either way:

  • The [fix] changeset names architecture:interaction-modality INV4 as its accessibility target, but a touch tap already reaches the help on main; name a criterion the current behavior fails, or tag the changeset as the behavior change DEC-1 decides.

[Automated review]

Comment thread .changeset/fieldlabel-info-icon-tap.md Outdated
'@astryxdesign/core': patch
---

[fix] FieldLabel: a tap on the label's info icon (`labelTooltip`) opens its help without activating the control. Before, the tap that opened the help also activated the label's control, as a tap anywhere on a native label does: on a touch screen it focused the field, raising the keyboard, or toggled the switch or checkbox the label names. Now a tap by finger or pen stops at the help, so touch reaches the help without operating the control, the operable path `architecture:interaction-modality` INV4 asks of every modality; a mouse click on the icon still activates the control like the rest of the label, and hover still shows the help.

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.

INV4 asks that touch "can reach each supported interaction", and a touch tap already opens this help on main (its verification row fails only hover-only, sticky touch hover or unreachable actions). As an AST-017 FR53 [fix], this needs a target the current behavior fails; otherwise it is the behavior change DEC-1 decides, tagged as AST-017 FR1 and FR7 give it ([feat], patch, when no caller must change code).

A tap already reaches the help on main, so the changeset names no
interaction-modality target. It describes what FieldLabel FR9 and DEC-1
decide: a tap on the info icon opens the help without also toggling or
focusing the control, today's unintended second action.
@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec 9e0bf83

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

Changes requested: the touch behavior works as described, and FR9 and DEC-1 are approved at this head, but the changeset's classification needs one fix. .changeset/fieldlabel-info-icon-tap.md is tagged [fix] and cites only FR9, which this pull request adds; under AST-017 FR5 an intentional change to the documented contract is not a fix unless it is an accessibility fix under FR53 that names the accessibility target it serves. Tag it [feat] with the patch bump (FR7), or name a WCAG 2.2 criterion or current record requirement the current behavior fails, and update the description's FR53 lines to match.

[Automated review]

Comment thread .changeset/fieldlabel-info-icon-tap.md Outdated
'@astryxdesign/core': patch
---

[fix] FieldLabel: a tap on the label's info icon (`labelTooltip`) opens its help without also toggling or focusing the control (`component:FieldLabel` FR9). Before, the tap that opened the help also activated the label's control, as a tap anywhere on a native label does: on a touch screen it focused the field, raising the keyboard, or toggled the switch or checkbox the label names, an unintended second action. Now a tap by finger or pen opens the help alone; a mouse click on the icon still activates the control like the rest of the label, and hover still shows the help.

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.

This is tagged [fix], but FR9 is written by this pull request. AST-017 FR5: "A proposal that intentionally replaces the documented contract is not a fix, except an accessibility behavior fix under FR53", and an FR53 fix names the accessibility target the current behavior fails. With no such target, this is the caller-compatible behavior change DEC-1 decides: [feat] with the patch bump (FR7).

FR9 is written by this change, so under spec:AST-017 FR5 the tap is a
caller-compatible behavior change that FieldLabel's DEC-1 decides, not
an FR53 accessibility fix: a patch [feat] (FR7).
@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec 080b3fb

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

This looks ready to merge: a finger or pen tap on a FieldLabel info icon now opens the help without focusing or toggling the control, a mouse click still activates it, and that matches the FieldLabel FR9 and DEC-1 an engineering owner approved at this head. The changeset is now a patch [feat], which is what AST-017 FR7 asks of a caller-compatible behavior change, so nothing further is needed from you.

[Automated review]

@cixzhang
cixzhang merged commit cfbc66f into meta:main Oct 31, 2026
51 checks passed
@vjeux
vjeux deleted the feat/fieldlabel-info-icon-tap branch October 31, 2026 18:15
cixzhang pushed a commit that referenced this pull request Nov 1, 2026
…8207)

## User impact

On a touch screen, a tap on a disabled Button, IconButton or ToggleButton, or on a disabled menu item, never shows the tooltip that explains why it is disabled. These controls are `aria-disabled` so that they keep their reason reachable, but `touchTrigger="auto"` treats them as an action, so the reason has no touch path.

## Problem and solution fit

- **Why it occurs:** `auto` asks whether the trigger performs an action, and an `aria-disabled` control still counts as one.
- **Why it harms the task:** a disabled control's reason cannot be read by touch.
- **Why that matters:** touch users cannot learn why a control is off, while mouse and keyboard users can.

An `aria-disabled` control performs no action. Under `auto`, when the tap's innermost interactive element is an `aria-disabled` control or a label for a disabled control, that element takes the tap. The reason opens and nothing activates. Every other tap is still the trigger's to decide, so taps on enabled controls do not change. A natively `disabled` control receives no `click` from the browser, so this restores the `aria-disabled` path only.

## Expected behavior and authority

- `spec:AST-085` FR5: a disabled control's reason is exposed with it. `architecture:interaction-modality` INV4: every modality has an operable path, and hover is never the only discovery path. On touch, that reason had no path.
- `component:Tooltip` and `component:HoverCard` DEC-1 and FR5: a disabled control is not an action, so its reason opens on a tap, and that restoration ships on its own as a patch (Compatibility and migration). This pull request is that patch. Tooltip's current-state gap "a disabled control's reason opens on no tap" goes, and both verification rows cite the disabled-control tests; the `auto` walk stays a gap until CLN-0024. Where the records said "a disabled or `aria-disabled` control", they now say "an `aria-disabled` control, or a label for a disabled control": a natively `disabled` control receives no `click` from the browser.
- `spec:AST-017` FR53: an accessibility behavior fix ships as a patch `[fix]`, and the changeset names the old and new behavior and its targets.

## Smallest restoration

- `isActionTrigger`: a disabled control (`aria-disabled="true"`, or `:disabled`), or a label whose control is disabled, is no action.
- `tapLandsOnDisabledControl` walks out from the tapped element on the clickable containers' own walk, `innermostInteractive` in `useClickableContainer`, which `hasInteractiveAncestor` now also uses. It answers one question: whether the innermost interactive element is an `aria-disabled` control or a label for a disabled control.
- `isDisabledControl` is one shared predicate in `utils/pressDisabled.ts`, which press feedback (`gestures/haptics.ts`) imports too, so the two never disagree about a control. It stays outside the gesture code, which a public import that uses no gesture never carries, and the CI WebKit lane's scope already covers it.
- The `touchTrigger` docs (English and Chinese) for Tooltip, HoverCard, `useTooltip` and `useHoverCard` add the disabled clause, named for `aria-disabled` controls: a natively `disabled` control receives no `click` from the browser.
- Lands after #9089, which is merged.

## Evidence

- **Before the change:** on main, a tap on a disabled Button with a `tooltip` opens nothing, and so does a tap on a disabled menu item inside a caller's Tooltip.
- **After the change:** the reason opens and nothing activates. A tap on a disabled control inside another acting trigger, such as an option row or a link-role card, now opens that trigger's tooltip or hover card.
- **Unchanged paths:** mouse hover, `touchTrigger="tap"` and `touchTrigger="none"`. A tap on an enabled control is still decided by the trigger: a truncated label inside a link still opens its tooltip and the link still runs, and a tap inside a default Overlay within a link leaves that link's tooltip shut, as before. The 19 form controls' `disabledMessage` tooltips already opened on a tap, also inside a clickable card, and still do.
- **Regression tests:** `touchTriggerTargets.test.tsx` taps every Core disabled-reason tooltip and expects the reason to open with nothing activating.
  - Button, IconButton and ToggleButton through `tooltip`.
  - The 19 form controls through `disabledMessage`: CheckboxInput, CheckboxList, DateInput, DateRangeInput, DateTimeInput, FileInput, MultiSelector, NumberInput, PowerSearch, RadioList, SegmentedControl, Selector, Slider, Switch, TextArea, TextInput, TimeInput, Tokenizer and Typeahead.
  - A disabled menu item through a caller's tooltip, and a disabled field inside a clickable card.
  - The enabled-link and Overlay guards.
  - Two HoverCard cases: a tap on an aria-disabled trigger, and on a disabled checkbox inside an option-row trigger, opens the card.
  - With main's sources, exactly the Button, IconButton, ToggleButton, menu-item and HoverCard cases fail; all pass with this change.
- `useTouchTrigger.test.ts` adds the disabled-control rows for `isActionTrigger` and `tapLandsOnDisabledControl`, and `utils/pressDisabled.test.ts` covers `isDisabledControl`.
- A disabled Link is not covered: it takes no pointer events, so a tap never reaches it.

## Scope

- [x] One defect is restored.
- [x] Separable contradictory or unsettled tagalongs were removed or split.
- [x] No new public API, visual representation, default, or interaction model is hidden under the bug-fix label.
- [x] Public text and artifacts contain no internal Meta context.

## Writing rubric results

`Tooltip.spec.md` and `HoverCard.spec.md`:

- R1 narration: none; the changed current-state item states what the shipped `auto` still does.
- R2 research in the record: none.
- R3 evidence naming a change: none; the changed verification cells name test files and cases.
- R4 rejected alternatives over one line or outside a decision: none.
- R5 pull request or issue references remaining: none.
- R6 ruled open questions still listing options: none.

## Testing

Local gates at 952974c (on main 66c0d38):

- These pass: `pnpm check:repo`, `pnpm check:knowledge`, `pnpm check:changesets`, `pnpm typecheck` (0 errors), ESLint on the touched TypeScript files, Prettier on the touched TypeScript and Markdown files, the root build, and the Storybook build. The touched `.doc.mjs` files keep main's formatting.
- `pnpm test:ui`: 17,237 tests pass.
- `pnpm test:node`: 14,949 pass, including `touch-support-bundle.test.mjs` (8) and the WebKit lane scope test `ci-interaction-webkit.test.mjs` (12). Its 2 failures, in the release `cache.test.mjs`, are independent of this change (#8520).
- `TouchTrigger.a11y.chromium.spec.ts` passes in Chromium, twice (24 of 24).

This branch was successfully deployed

1 active deployment
Preview — 080b3fb9 Deployed Oct 31, 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) 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.

2 participants