Skip to content

fix(core): a disclosure summary, a menu checkbox or radio, and editable text are nested controls wherever Core's shared nested-control rule applies - #14308

Draft
cixzhang wants to merge 8 commits into
mainfrom
lane2/nested-press-selector

Conversation

@cixzhang

@cixzhang cixzhang commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

User impact

A person clicks a disclosure <summary>, a menu checkbox or radio (role="menuitemcheckbox" or role="menuitemradio"), or editable text (contenteditable) inside a clickable row or card. Today that one click both works the control and runs the row's or card's action: the disclosure opens and the row navigates, or the editable text takes the caret and the Table row expands. A mouse or pen press on one also darkens the whole row or card as if the press would run it. After this change the click and the press belong to the control only, as they already do for buttons, links and form controls.

The same list decides every other place Core tells a nested control from its container, so they change with it. What a mouse user (and, where named, a touch or pen user) now sees:

  • ClickableCard, SelectableCard, Item and TreeList rows, and SideNavItem rows with actions or an expand toggle (through the shared press rule they adopt in fix(SideNav): a mouse or pen press on a button in a row's actions, or on its expand toggle, paints only that control #14303): no container action and no container press for a click or press on one. A row whose root is a link still runs and paints.
  • A clickable Token: a click on one of these, or on a form control or its label, in endContent no longer runs onClick. Its click used a private closest('button, a') check while its press used the shared rule; it now uses the shared rule, which closes the INV7 gap architecture:press-feedback recorded for it.
  • A Token that is both a link and removable: a click on one in endContent no longer follows the link or runs onClick.
  • TextInput, TextArea and NumberInput: a click on one in the start icon or end slot no longer moves focus to the input.
  • FieldLabel with a ReactNode description: a click on one in the description no longer reaches the field's control.
  • Overlay on a touch screen: a tap on one in the media no longer toggles the overlay.
  • Toast: a swipe that starts on one no longer moves the toast; F6 moves focus to one when it is the first focusable control in the newest toast, and skips a control role on an element that takes no focus.
  • SideNavHeading: hovering or clicking one in the heading's icon no longer opens the heading menu.
  • The menu bottom sheet: a press on one in a row's content stays with that control.
  • Table row expansion and tree rows: a click on one inside a row no longer expands or collapses the row. A Table inside an editable region now expands and toggles its rows on click.
  • A sortable Table header that holds one gets the development warning that the header holds its own control.
  • A tap on an enabled control of these kinds inside a disabled clickable container is left to the control (useTouchTrigger).
  • The exported INTERACTIVE_SELECTORS, hasInteractiveAncestor, useClickableContainer and useInputContainer include them.

Problem and solution fit

  • Why does the container run? Core decides "this click belongs to something else" from one list, INTERACTIVE_SELECTORS (hooks/useClickableContainer.ts). It names buttons, links, form controls and a set of control roles, but not summary, the two menu item roles, or editable text.
  • Why does that harm the task? One click does two things, and the second one, often a navigation, takes the person away from the control they meant to use.
  • Why does it matter? These controls are common in row and card content (an expandable note, a pin toggle, an inline editor), and the press paint already promises something the release then breaks.

The narrow fix adds the four kinds to the one list. Every consumer reads that list, so they change together; a second, narrower list for the press half would be a parallel system.

Expected behavior and authority

  • architecture:press-feedback INV7: "A press on a nested interactive element that does not activate the row or card paints that element only, never the row or card." Paint follows activation, so the click and the paint change together.
  • component:Item FR9 and the card records: a nested interactive element does not activate the row or card. summary, the two menu item roles, and editable text are interactive elements.
  • INV7's exception stays: in a row whose root is a link or that carries a parent-supplied role, a press on a nested control activates the row, so the row paints.
  • The records ruling for this pull request is in this comment: every consumer of the shared list, and the clause amendments below, follow from those records.

Four current clauses state the rule for their component and are amended here, in the present tense:

  • component:TextInput FR12 (and component:NumberInput FR12, which inherits it): a click on the control box outside the input and outside any control nested in the box focuses the input.
  • component:TextArea FR11: a click on the container outside the textarea and outside any control nested in the container focuses it.
  • component:Token FR4: the container's click runs onClick outside any nested control, and the link-and-remove surface follows its link outside the Remove button and any control in end content. Token's "click and press disagree" current-state gap leaves the record.
  • component:SideNavHeading FR2: the block opens the menu apart from headerEndContent and any control nested in the block, such as one in icon.

Smallest restoration

  • INTERACTIVE_SELECTORS gains summary, [contenteditable]:not([contenteditable="false"]), [role="menuitemcheckbox"] and [role="menuitemradio"].
  • The CSS copy of that list, NESTED_CONTROL_ACTIVE in privateAttributes/press.stylex.ts, gains the same four entries; RadioListItem.press.source-build.test.mjs reads the list and keeps the two equal.
  • Toast's swipe target selector drops its own contenteditable entry and uses the shared list.
  • Toast's F6 lookup takes only a candidate that can take focus (FOCUSABLE_SELECTOR), so a control role with no tabindex is skipped.
  • A clickable Token's container click uses pressBelongsToControl, the shared rule Item's row click uses, instead of its own closest('button, a'), and the INV7 gap sentence for it leaves architecture:press-feedback.
  • The Table row-expansion and tree plugins drop their own contenteditable check, which existed only because the shared list lacked it. One difference: the old check also matched an editable region around the whole table, while the shared walk stops at the row, so a Table inside an editable region now expands and toggles its rows on click. That region is around the table, not a control in the row; a new row-expansion test covers it.

Evidence

  • Reproduction before the change: each new test below fails with main's useClickableContainer.ts.
  • Result after the change: the new tests pass, and the existing suites of every consumer pass.
  • Representative unchanged path: a click on the row's own label still runs the row (Chromium), a row whose root is a link keeps its press paint for a press on each new kind (jsdom), and contenteditable="false" content still runs the row (jsdom).
  • Regression tests: __tests__/nestedControlKinds.test.tsx (ClickableCard, SelectableCard, Item, TreeList: click and press, each kind); __tests__/NestedControlKinds.a11y.chromium.spec.ts with the story's Control Kinds (press paint and click, each kind); new cases in the Table row-expansion, tree and sortable tests, Token.test.tsx (clickable and link-and-remove), TextInput.test.tsx, FieldLabel.test.tsx, Overlay.test.tsx, SideNavHeading.test.tsx (its icon), useTouchTrigger.test.ts, TokenizerBottomSheet.test.tsx and ToastViewport.test.tsx (swipe and F6), plus pressBelongsToControl cases for the menu sheet. The row and card cases cover a mouse, a pen and a finger.

PowerSearch also reads the list, but only to tell its own status icon from an info-tip inside it, which callers cannot fill, so no caller-reachable path changes there.

Scope

Components: core (shared nested-control list and its exported hooks), ClickableCard, SelectableCard, Item, TreeList, SideNavItem, Token, TextInput, TextArea, NumberInput, FieldLabel, Overlay, Toast, SideNavHeading, DropdownMenu (menu bottom sheet), Table, Tokenizer

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

Testing

On Linux:

  • At ce227596, vitest run on packages/core/src/hooks, the two nested-control tests, Toast, RadioList, Table/plugins, Tokenizer, PowerSearch, SideNav, Layer, Item, TreeList, Token, ClickableCard, SelectableCard, DropdownMenu, TextInput, Field, Overlay, TextArea, NumberInput, DateTimeInput and TimeInput: 254 files, 7097 of 7098 pass. The one failure was the SideNavHeading icon test's own query (the heading renders its icon in both layouts); at this head SideNavHeading.test.tsx passes 58/58. The same paths at main 97b1d009 (the first 16) pass 5423/5423.
  • Red-first, with main's useClickableContainer.ts only: 76 of the new tests fail across all 7 test files that test the list's consumers, each on its assertion. With main's Token.tsx only, the two clickable-Token click tests fail. With main's useTableRowExpansion.tsx, the editable-region test fails.
  • Real Chromium: NestedControlKinds.a11y.chromium.spec.ts and NestedControlPress.a11y.chromium.spec.ts pass 29/29; with main's useClickableContainer.ts all 8 NestedControlKinds cases fail.
  • tsc for Core and Storybook: pass. ESLint on the changed files: no errors; its two warnings are already on main.
  • At 08034cb4, vitest run on packages/core/src/Toast and packages/core/src/Token: 19 files, 579 pass. The F6 test with a menu checkbox that takes no focus fails with ce227596's ToastViewport.tsx (the head before the focus filter).
  • pnpm size:pages against main 97b1d009, first-load JS, minified / gzip bytes: docs +114 / +14, form +114 / +20, menu +114 / +27, table +114 / +30. No page gains a module or a chunk.
  • The full visual run: to follow in CI.

…le text are nested controls in every container
@vercel

vercel Bot commented Dec 4, 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 Dec 4, 2026 1:18pm UTC

Request Review

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

astracat-bot Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🔄 In progress (for maintainers only) Dec 4, 2026, 1:18 PM UTC

@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Dec 4, 2026
@github-actions

github-actions Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

Current run: The current CI run concluded skipped. Current analysis is unavailable.


Generated by PR Enrichment workflow | View current CI run

…ol rule, as its press does; every consumer of the list has a red-first test
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Dec 4, 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: widening the shared nested-control list fixes Item rows, cards, TreeList rows and Table rows, and the clickable Token's click and press now agree, but three current component records say the opposite of what the code does, a toast can lose F6, and the release note names a component this change does not touch.

  • Three current clauses now say the opposite of the code: a click on a disclosure summary, a menu checkbox or radio, or editable text in startIcon no longer focuses TextInput, TextArea or NumberInput (TextInput FR12, TextArea FR11, NumberInput FR12), no longer follows a link-and-remove Token (Token FR4), and no longer opens a SideNavHeading menu from its icon (SideNavHeading FR2) — reproduced locally on both revisions — so keep those three consumers on their current behaviour or amend the three clauses here with an engineering owner's approval at this head.
  • F6 reaches nothing in a toast whose first control is a menu checkbox or radio with no tabindex: ToastViewport.tsx:552-564 takes the first match of the widened list and focuses it, and such an element cannot take focus, so the keyboard user stays put where main moved them to the toast's Undo button (reproduced locally); filtering the candidates through FOCUSABLE_SELECTOR fixes it.
  • The changeset and title promise containers this head does not change: SideNavItem reads none of the shared list (SideNavItem.tsx:848-850, :993-995, identical behaviour on both revisions here), and "in every container" also misses the Selector-family control boxes, where a click on one of these kinds in startIcon still opens the panel — so drop SideNavItem from the changeset and the Scope line until it adopts the rule, and bound the title to the containers that read the list.
  • component:Token keeps a gap entry this head closes: the clickable-token "click and press disagree" entry under Known gaps is now false, and only the twin sentence in the press-feedback record was removed.
  • No first-load gzip numbers for the shared module this change grows (INV10 asks for them per reference page); measured here they are at most +0.1 KB per entry, so stating them closes it (non-blocking).
  • Two names in the changeset nothing can reach: DateTimeInput and TimeInput take no caller content in their icon or end slot, so no consumer can meet that line (non-blocking).

Approval also waits on an owner decision for the consumers no current record settles — Table row clicks, including a Table inside an editable region, Overlay's tap on a touch screen, and a Toast swipe that starts on one of these kinds. The description's statement that a maintainer ruled on this names no decision card, no quoted words with a time and no decision trace, and no maintainer comment or review is on the pull request, so it cannot settle it.

Claims and files checked

Review mode: full; reason: spec-record

Claims:

  • Title: the four kinds are nested controls in every container: false: SideNavItem rows read none of the shared list, and the Selector-family control boxes test their own trigger instead (SideNavItem.tsx:848-850, MultiSelector.tsx:2001-2009); both behave identically on base and head in probes run here
  • Item, ClickableCard, SelectableCard and TreeList rows no longer run or paint for a click or press on one; a link-root row still runs and paints: verified: nestedControlKinds.test.tsx, four containers x four kinds x mouse, pen and finger, plus the link-root and contenteditable=false cases; run here, and 92 of the new cases fail with main's list
  • SideNavItem rows with actions or an expand toggle change the same way (changeset): false: SideNavItem.tsx reads none of the shared list at this head; a probe gives the same result on base and head
  • A clickable Token's click on one of these kinds, or on a form control or its label, no longer runs onClick, so the click matches the press: verified: Token.test.tsx clickable cases and a probe here: base runs onClick once (twice through a label), head not at all
  • A link-and-remove Token no longer follows the link for a click on one in end content: verified: Token.test.tsx link-and-remove case and a probe here; it contradicts the Token record's FR4
  • TextInput, TextArea, NumberInput, DateTimeInput and TimeInput no longer focus the input for a click on one in the icon or end slot: verified for the first three, unreachable for the last two: probes here on all three reachable fields; DateTimeInput and TimeInput take no caller content in those slots
  • FieldLabel with a ReactNode description no longer forwards such a click to the control: verified: the new FieldLabel case, run here; it matches the FieldLabel record's FR3
  • Overlay on a touch screen no longer toggles for a tap on one in the media: verified: the new Overlay case, run here, red on main's list
  • A Toast swipe that starts on one no longer moves the toast: verified: the new ToastViewport swipe case for a pen, run here, red on main's list
  • F6 moves focus to one when it is the first control in the newest toast: false: true for a summary, which the new test uses; for a menu checkbox or radio with no tabindex F6 now moves focus nowhere, where main reached the next real control (probe here)
  • SideNavHeading no longer opens the heading menu for a hover or click on one in its icon: verified: the new SideNavHeading case and a probe here; it contradicts the SideNavHeading record's FR2
  • The menu bottom sheet keeps such a press with the control in a row's content: verified: the shared pressBelongsToControl cases in nestedControlKinds.test.tsx, which the sheet calls at MenuBottomSheetActionList.tsx:60 and :80
  • Table row expansion and tree rows no longer toggle for a click on one inside a row: verified: the new row-expansion and tree cases, run here, red on main's list
  • A Table inside an editable region now expands and toggles its rows on click: verified: the new row-expansion case, and for the tree plugin a probe run here: base does not toggle, head does
  • A sortable Table header that holds one now warns in development: verified: the new sortable case, run here, red on main's list
  • A tap on an enabled control of these kinds inside a disabled clickable container is left to the control: verified: the four new useTouchTrigger cases, run here, red on main's list
  • The exported list and hooks include the kinds, so a container built on them changes the same way: verified: the list is exported from the package's hooks entry point, and the hooks read it directly
  • PowerSearch has no caller-reachable change: verified: its only use is telling its own status icon from an info-tip inside it, which no caller fills (PowerSearch.tsx:1570-1580, 1743-1747)
  • The CSS copy gains the same four entries and a source-build test keeps the two equal: verified: press.stylex.ts:56-70 and the RadioList source-build test, which passes here
  • Toast's swipe selector drops its own editable-text entry for the shared list: verified: Toast.tsx:64
  • The Table plugins' local check existed only because the shared list lacked it: verified: the removed comment says so, and the shared walk now covers the in-row case
  • A maintainer ruled on a date that every listed consumer follows from the cited records: unverified: no decision card, no quoted words with a time and no decision trace in the description or a linked record, and no maintainer comment or review on the pull request
  • One defect is restored; no new interaction model is hidden under the bug-fix label (checkboxes): false: three current clauses state the opposite of the head's behaviour, so the change is more than a restoration for those consumers
  • Public text and artifacts contain no internal context: verified: a scan of every added line of the diff and of each commit, plus the title, body and branch name, matches nothing
  • The test suites, red-first runs, Chromium specs, tsc and ESLint results in the description: reported: the equivalent runs here at this head: 272 files and 7,551 tests pass; 92 of the new cases fail with main's list

Files:

  • .changeset/nested-control-kinds.md: findings: names SideNavItem, and names two fields no caller content can reach
  • apps/storybook/stories/NestedControlPress.stories.tsx: clear
  • docs/architecture/press-feedback.md: clear (the removed Token gap sentence matches the head; the twin entry in the Token record is a finding)
  • packages/core/src/Field/FieldLabel.test.tsx: clear
  • packages/core/src/Layer/useTouchTrigger.test.ts: clear
  • packages/core/src/Overlay/Overlay.test.tsx: clear (the behaviour awaits an owner decision)
  • packages/core/src/SideNav/SideNavHeading.test.tsx: findings: the case asserts behaviour the SideNavHeading record's FR2 contradicts
  • packages/core/src/Table/plugins/rowExpansion/useTableRowExpansion.test.tsx: clear
  • packages/core/src/Table/plugins/rowExpansion/useTableRowExpansion.tsx: clear (row-click behaviour awaits an owner decision)
  • packages/core/src/Table/plugins/sortable/useTableSortable.test.tsx: clear
  • packages/core/src/Table/plugins/tree/useTableTreeData.test.tsx: clear (no case covers the editable region around the whole table, which the row-expansion suite does cover)
  • packages/core/src/Table/plugins/tree/useTableTreeData.tsx: clear (row-click behaviour awaits an owner decision)
  • packages/core/src/TextInput/TextInput.test.tsx: findings: the case asserts behaviour the TextInput record's FR12 contradicts
  • packages/core/src/Toast/Toast.tsx: clear (the swipe change awaits an owner decision)
  • packages/core/src/Toast/ToastViewport.test.tsx: findings: no case covers F6 landing on a control that cannot take focus
  • packages/core/src/Token/Token.test.tsx: findings: the link-and-remove case asserts behaviour the Token record's FR4 contradicts
  • packages/core/src/Token/Token.tsx: clear (the click now matches the press; the Token record's Known gaps entry is a finding)
  • packages/core/src/Tokenizer/TokenizerBottomSheet.test.tsx: clear
  • packages/core/src/__tests__/NestedControlKinds.a11y.chromium.spec.ts: clear (not run here or in CI at this head)
  • packages/core/src/__tests__/nestedControlKinds.test.tsx: clear
  • packages/core/src/hooks/useClickableContainer.ts: findings: the widened list reaches the toast focus lookup and the consumers whose records contradict it
  • packages/core/src/privateAttributes/press.stylex.ts: clear

Automated review (maintainer link)


[fix] A disclosure `<summary>`, an element with `role="menuitemcheckbox"` or `role="menuitemradio"`, and editable text (`contenteditable`) now count as nested controls everywhere Core tells a nested control from its container. A click on one belongs to that control, and a press on one paints only that control:

- `ClickableCard`, `SelectableCard`, `Item` and `TreeList` rows, and `SideNavItem` rows with `actions` or an expand toggle: a click on one inside the row or card no longer runs the row's or card's action, and a mouse, pen or finger press on one no longer darkens the whole row or card. A row whose root is a link still runs and paints.

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.

SideNavItem reads none of the shared list at this head: endContent renders inside the primary link or button (SideNavItem.tsx:848-850) and actions render beside it (:993-995), and a probe gives the same result on this revision and its base. The release note is read by consumers of this release, so drop SideNavItem here until the pull request that adopts the shared press rule lands.

Comment thread .changeset/nested-control-kinds.md Resolved
@cixzhang

cixzhang commented Dec 4, 2026

Copy link
Copy Markdown
Contributor Author

(Posted by Cindy's agent.) Records ruling for this PR: every consumer of the shared nested-control list follows architecture:press-feedback INV7 ("A press paints the surface it lands on that invokes the action, and nothing else"), component:Item FR9 and the card records: a nested interactive element is not the container's action. That covers row and card clicks, Table row clicks (including a Table inside an editable region), the input container click-to-focus, Token and TokenLink, Overlay's touch tap, Toast's swipe start, SideNavHeading's icon and the menu sheet row release, and it closes the recorded clickable-Token gap. The TextInput, TextArea, Token and SideNavHeading clause amendments here state that same rule. No owner card is needed; this is records-decided, not a new owner decision.

…ed-control rule; Toast F6 skips a control role that takes no focus
@cixzhang cixzhang changed the title fix(core): a disclosure summary, a menu checkbox or radio, and editable text are nested controls in every container fix(core): a disclosure summary, a menu checkbox or radio, and editable text are nested controls wherever Core's shared nested-control rule applies Dec 4, 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.

One change to make, and approval waits on an engineering owner's decision on the records.

  • The release note promises containers this revision does not change: its first bullet tells consumers that SideNavItem rows with actions or an expand toggle stop running and painting for a nested summary, menu checkbox or radio, or editable text, while SideNavItem.tsx reads none of the shared list at this revision (endContent renders inside the primary link or button at :848-849, actions beside it at :993-995, and the file is identical to the base) and this pull request's own record edit still lists that surface as an open gap in docs/architecture/press-feedback.md:45; drop SideNavItem from .changeset/nested-control-kinds.md:7 and from the ## Scope line until the pull request that adopts the shared press rule lands.
  • Miss: The tree plugin's editable-region change has no test

Approval also waits on an engineering owner, because this revision rewrites normative text in five records — component:TextInput FR12 (inherited by component:NumberInput FR12), component:TextArea FR11, component:Token FR4 with its removed "Click and press disagree on a nested control" gap, component:SideNavHeading FR2, and the clickable-Token INV7 gap sentence in architecture:press-feedback. The records ruling in this pull request's discussion settles the behavior of every consumer, but it predates the commit that writes those clauses and names no revision, and the repository's spec-owner-approval check is still waiting; an engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request, and you may do so yourself if you are one.

Two smaller points for that same pass: the reworded FR12, FR11 and FR2 say "any control nested", while the code recognises exactly the shared list, which still passes over native media controls (audio[controls], video[controls]) and the textbox, searchbox, treeitem, gridcell and scrollbar roles — and Token FR4's list of kinds leaves out roles the list does include (switch, tab, option, slider, spinbutton); naming the shared list in all four keeps record and code the same size. Both Table plugins drop the editable-region check, but only the row-expansion plugin has a case for it, so one mirrored case in the tree plugin's tests would cover the other half of what the release note says.

Everything else checks out here: the fifteen consumer test files pass (1135 tests, run in this review), 90 of their cases fail with the base's list, the compiled-CSS test keeps the paint list equal to the click list, the API surface is unchanged, and a real-Chromium run of the new Control Kinds story shows each of the four kinds running its Item row once on the base and not at all here.

Claims and files checked

Review mode: full; reason: spec-record

Claims:

  • Four kinds count as nested controls wherever the shared rule applies — verified (list plus CSS copy; 90 red-first failures with the base's list).
  • Rows and cards (ClickableCard, SelectableCard, Item, TreeList) stop running and painting for them — verified (jsdom cases for click and for mouse, pen and finger; real-Chromium run of the story).
  • SideNavItem rows change too — false in the release note and the scope list, bounded correctly in the user-impact bullet.
  • A clickable Token's click now follows the shared rule and closes the recorded press gap — verified.
  • A link-and-remove Token no longer follows its link for a click on one in end content — verified (test for the handler; the link path traced in the shared hook).
  • TextInput, TextArea and NumberInput no longer focus the field for such a click in the start icon or end slot — verified.
  • FieldLabel description, Overlay touch tap, Toast swipe start, SideNavHeading icon, menu bottom sheet, disabled-container tap — verified, each with a case that fails on the base.
  • Table row expansion and tree rows no longer toggle, and a Table inside an editable region now does — verified; the tree half has no test.
  • A sortable header holding one warns in development — verified.
  • The exported list and hooks include the four kinds — verified.
  • The status-icon path in the search field cannot be reached by callers, so nothing changes there — verified by reading the source.
  • F6 skips a control role that takes no focus — verified (new case; the earlier gap is fixed).
  • No public API added or changed — verified with the repository's own generator over both built trees (0 rows).
  • First-load deltas on the four reference pages (+14 to +30 bytes gzip) — reported, and matched here by the repository's boundary check (largest per-entry delta 0.1 KB).
  • Older-revision suite counts, the two real-browser specs at 29/29, type-check and lint results, and the new Toast and Token run at this revision — reported, none contradicted by what ran here.
  • No internal context in the public text — verified over the added lines, title, description, branch name and commit messages.

Files:

  • .changeset/nested-control-kinds.md — finding above.
  • docs/architecture/press-feedback.md, docs/specs/components/TextInput/TextInput.spec.md, docs/specs/components/TextArea/TextArea.spec.md, docs/specs/components/Token/Token.spec.md, docs/specs/components/SideNav/SideNavHeading.spec.md — proposed clause changes, waiting on owner approval; wording point above.
  • packages/core/src/hooks/useClickableContainer.ts, packages/core/src/privateAttributes/press.stylex.ts — clear; the two lists stay equal under the compiled-output test.
  • packages/core/src/Token/Token.tsx, packages/core/src/Toast/Toast.tsx, packages/core/src/Toast/ToastViewport.tsx — clear.
  • packages/core/src/Table/plugins/rowExpansion/useTableRowExpansion.tsx, packages/core/src/Table/plugins/tree/useTableTreeData.tsx — clear; the tree test gap above.
  • apps/storybook/stories/NestedControlPress.stories.tsx — clear; its Control Kinds story is what this review captured.
  • packages/core/src/__tests__/nestedControlKinds.test.tsx, packages/core/src/__tests__/NestedControlKinds.a11y.chromium.spec.ts — clear; the browser spec was not run at this revision.
  • packages/core/src/{Field/FieldLabel,Layer/useTouchTrigger,Overlay/Overlay,SideNav/SideNavHeading,TextInput/TextInput,Toast/ToastViewport,Token/Token,Tokenizer/TokenizerBottomSheet}.test.tsx and the three Table plugin test files — clear, all passing here.

Automated review (maintainer link)


[fix] A disclosure `<summary>`, an element with `role="menuitemcheckbox"` or `role="menuitemradio"`, and editable text (`contenteditable`) now count as nested controls everywhere Core tells a nested control from its container. A click on one belongs to that control, and a press on one paints only that control:

- `ClickableCard`, `SelectableCard`, `Item` and `TreeList` rows, and `SideNavItem` rows with `actions` or an expand toggle: a click on one inside the row or card no longer runs the row's or card's action, and a mouse, pen or finger press on one no longer darkens the whole row or card. A row whose root is a link still runs and paints.

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.

SideNavItem reads none of the shared list at this revision: endContent renders inside the primary link or button (SideNavItem.tsx:848-849), actions render beside it (:993-995), and the file is identical to the base. This pull request's own record edit agrees — docs/architecture/press-feedback.md:45 still carries the INV7 gap for a SideNavItem actions control or expand toggle. Consumers read this note for what the release changes, so drop SideNavItem here (and from the ## Scope line) until the pull request that adopts the shared press rule lands.

| FR10 | Enter calls `onEnter` unless the key event commits an IME composition; `onKeyDown` receives every key, including composing ones. | Current tests |
| FR11 | Standalone, height comes from the shared element size for the resolved size, as a minimum that grows with a set text size under `spec:AST-102` FR4: explicit `size`, then the nearest size provider, then `md`. Inside InputGroup the control fills the group row's height, so its own `size` does not set its height. Text uses the body type size at every size, floored at 16 CSS px only on the iOS touch path. | `family:input-fields` FR9; `architecture:component-size-cascade`; current source and tests; `spec:AST-102` FR4 |
| FR12 | `startIcon` renders a small secondary icon before the input. While the field is enabled, a click on the control box outside the input focuses the input. | Current tests |
| FR12 | `startIcon` renders a small secondary icon before the input. While the field is enabled, a click on the control box outside the input and outside any control nested in the box focuses the input. | Current 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.

"any control nested in the box" is wider than the code: the box's click goes through INTERACTIVE_SELECTORS (hooks/useClickableContainer.ts:61-84), which still passes over native media controls (audio[controls], video[controls]) and the textbox, searchbox, treeitem, gridcell and scrollbar roles, so a click on one of those still focuses the input. component:TextArea FR11 and component:SideNavHeading FR2 take the same wording, and component:Token FR4 goes the other way, listing kinds and leaving out switch, tab, option, slider and spinbutton, which the list does include. Naming the shared nested-control list in all four keeps the record the same size as the code.

…ops the shared-selector INV7 gap this change closes
@cixzhang cixzhang added ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) ci:run-visual Run the visual suite on this PR; write access, next push (AST-030 FR12) labels Dec 4, 2026
@cixzhang

cixzhang commented Dec 4, 2026

Copy link
Copy Markdown
Contributor Author

/approve-spec 5fe37ea

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Dec 4, 2026
…ed nested-control list; the tree plugin tests a table inside an editable region
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Dec 4, 2026
@cixzhang

cixzhang commented Dec 4, 2026

Copy link
Copy Markdown
Contributor Author

/approve-spec 494edef

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

This branch was successfully deployed

1 active deployment
Preview — 494edef1 Deployed Dec 4, 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) ci:run-visual Run the visual suite on this PR; write access, next push (AST-030 FR12) CLA Signed This label is managed by the Meta Open Source bot. needs:design-review Affects visuals — Design should review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant