Skip to content

fix(NavHeadingMenuItem): keep disabled rows focused and inert - #11416

Merged
cixzhang merged 17 commits into
meta:mainfrom
korkt-kim:korkt-kim/ast-085-nav-heading-menu-item
Nov 23, 2026
Merged

cixzhang merged 17 commits into
meta:mainfrom
korkt-kim:korkt-kim/ast-085-nav-heading-menu-item

Conversation

@korkt-kim

@korkt-kim korkt-kim commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

User impact

A person can be focused on a nav-heading menu destination when it becomes unavailable. With a LinkProvider router that does not forward a DOM ref, that transition drops focus to the page. A disabled action row also still invokes consumer keyboard, pointer, and hover callbacks, even though its selection callback is blocked. Those callbacks can change application state while the row is unavailable.

Problem and solution fit

Focus tracking is attached to the router's forwarded ref, which the router may not provide. The item now attaches the existing shared focus owner to its own content span and resolves the focusable row from there. It restores a focused immediate replacement only while focus remains unclaimed in the roots it can inspect. Hidden Activity lifetimes do not retain a stale focus handoff.

The item uses withholdCallerHandlers to withhold caller event callbacks except focus and blur while disabled. Parent menu handling and caller-owned label events keep their existing paths.

The shared focusReturn module supplies exact-ownership and unclaimed-focus checks for row replacements. Its existing isFocusLost function retains the PR base's document-local behavior for overlays, disclosures, and removal repair. Row replacements check accessible enclosing frames and shadow hosts. When a cross-origin parent cannot be inspected, they retain the document-local fallback rather than rejecting restoration solely because Document.hasFocus() is false. Both ownership checks use the shared isShadowRoot guard, so a document's named host element is not mistaken for a shadow host.

Expected behavior and authority

  • NavHeadingMenu FR2–FR7: item semantics, caller-owned content, keyboard movement, and disabled selection behavior.
  • AST-085 FR1, FR2 and FR4: keep the existing focus order, block disabled activation and callbacks, and retain focus when a control becomes disabled.
  • React runtime INV16: extend the existing shared owner rather than adding a component-local focus tracker.

Smallest restoration

  • Reuse the shared disabled-handler filter, retaining the internal disabled mousedown guard without reattaching the caller's handler.
  • Extend internal useFocusAcrossSwap for an owned-content attachment while retaining its existing direct-ref call sites. Non-HTML refs are still forwarded, but are not inspected as focus targets. Expire unconsumed focus handoffs and keep the item's FR4 claim lookup intact.
  • Keep focus ownership checks in focusReturn, separate from the existing document-local isFocusLost contract. The file header names those checks and the row-swap caller.
  • Add item and shared-focus regression tests and a Core patch changeset.

Disabled destinations remain absent, rows retain tabIndex=-1, and arrows/typeahead still reach disabled rows. No Link implementation, public prop, role policy, production styling, production layout, or story change is included.

Evidence

  • Before: disabling the focused custom-router destination moves focus to the page. Enter and Space on the disabled action produce eight consumer keyboard changes in the recording fixture; its click-capture callback also runs.
  • After: focus remains on the disabled destination. The same disabled keyboard and pointer inputs produce zero consumer changes and leave the menus open. Focused regressions also verify that typing and hover callbacks are withheld while focus/blur and parent/child events remain intact.
  • Representative unchanged path: re-enable, then press Enter: the action saves once and the router destination navigates once; each menu closes on its successful selection.
  • Regression proof: focused tests retain non-forwarding and composed-ref router cases, caller focus handoffs, cancellation, child/parent events, and Activity transitions without duplicating existing native-link coverage. The nested Activity case reproduces stale focus restoration after reveal when only the Effect cleanup is removed. The cross-origin ownership regression checks document-local ownership and unclaimed focus with hasFocus() returning false; it detects the removed guard. The removal regression still protects overlay return, and the frame and shadow-root cases protect inspectable caller handoffs. A named-document regression detects either ownership check reverting to property-presence detection.

The linked recordings use Playwright Chromium 149 at 1280 × 800 with the same fixture and input sequence. The fixture loads the base item and focus-hook modules from 24abd1dfa4 for AS-IS and the implementation at e91f185239 for TO-BE. They document that earlier revision's original correction, not the later shared-helper follow-ups. F8/F9 change availability without taking focus. Readouts come from real DOM focus and callbacks; the temporary fixture and media are not part of the source diff. These clips cover Chromium light-DOM behavior, not screen-reader speech or cross-browser conformance.

Chromium 156 checks at 6353c47094 confirm focus retention for the non-forwarding router, blocked disabled keyboard and pointer callbacks, re-enabled navigation, arrow movement, focused same-origin and cross-origin row replacements, and caller-selected local input and shadow-host handoffs. A fresh named-document comparison reproduces all three shared-hook callers dropping focus on that revision when <form name="host"> is present; removing the named form removes the failure. With this correction, NavHeadingMenuItem, Item, and TreeListItem retain focus on disable and re-enable, including inside a same-origin iframe. Separate checks cover native named form, iframe, img, embed, and object elements, preserve an outside input's focus, and retain the existing shadow-host fallback. The background-window condition remains modeled by the DOM regression, not claimed as a real-browser background-window reproduction.

AS-IS

nav-heading-disabled-as-is.mp4

TO-BE

nav-heading-disabled-to-be-e91f185239.mp4

Scope

Components: NavHeadingMenuItem, internal useFocusAcrossSwap and focusReturn

  • One defect is restored: disabled nav-heading items retain their focus and reject consumer interaction callbacks.
  • 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.

Follow-up: #13123. A restored row receives plain focus(), so after a mouse click it can draw the keyboard focus ring (as native-link rows already do on main); restoring through the shared last-input focus helper fixes every caller of this hook.

Testing

For the test-only maintainer commit ec8c483dbd: two cases in useFocusAcrossSwap.test.tsx, each failing with its guard removed. A row that Suspense hides and returns replaced in the same task does not take focus (fails without the hidden-ancestor check). A handoff from a descendant ref that detaches while the hook's Effect stays connected expires before a later replacement (fails without the microtask expiry). utils, NavHeadingMenu and Item suites: 75 files, 1,506 tests pass; core tsc, eslint and Prettier are clean.

For the header-only follow-up c4f5be7fea:

  • pnpm exec vitest run --project ui packages/core/src/utils/focusReturn.test.ts packages/core/src/utils/useFocusAcrossSwap.test.tsx --maxWorkers=2 — 2 files, 44 tests passed.
  • Scoped strict ESLint, Prettier, pre-commit lint-staged and pnpm check:repo — passed.
  • pnpm specs:for --diff origin/main, pnpm review:pre, and git diff --check — completed; the pre-review report lists no automatic findings.

The functional implementation is unchanged. Earlier checks for 773416324e, including the named-document correction:

  • pnpm exec vitest run --project ui packages/core/src/NavMenu packages/core/src/utils/useFocusAcrossSwap.test.tsx packages/core/src/utils/focusReturn.test.ts packages/core/src/Item packages/core/src/TreeList packages/core/src/utils/nodeType.test.ts packages/core/src/utils/flatTree.test.ts packages/core/src/gestures/__tests__/touchActionRule.test.ts --maxWorkers=2 — 13 files, 365 tests passed.
  • pnpm exec vitest run --project ui packages/core/src/hooks/useFocusTrap.test.tsx packages/core/src/ComplexSelector/ComplexSelector.test.tsx packages/core/src/Layer/useLayer.test.tsx packages/core/src/Dialog/Dialog.test.tsx packages/core/src/BottomSheet/BottomSheet.test.tsx --testNamePattern 'focus|Focus|iframe|shadow|remov|unmount' --maxWorkers=2 — 5 files, 168 selected tests passed; 372 skipped by the name filter.
  • pnpm exec vitest run --project ui packages/core/src/utils --maxWorkers=2 — 68 files, 1,243 tests passed; this overlaps the focused utility tests above.
  • pnpm -F @astryxdesign/core typecheck — Core source, tests, and consumer docs passed.
  • pnpm lint:strict — passed with 0 errors and 237 warnings; includes repository, knowledge, and changeset validation.
  • pnpm build — full package build passed.
  • Prettier checks on the two files changed in this follow-up.
  • Pre-commit lint-staged and pnpm check:repo — passed without changing the validated source.
  • pnpm specs:for --diff origin/main, pnpm review:pre, and git diff --check — completed; the pre-review report lists no automatic findings.
  • Chromium checks described above.

Guard consumer activation callbacks while preserving observation, parent menu events, and caller-owned label content. Keep focus across disabled router swaps through the shared focus hook without requiring forwarded DOM refs. Preserve existing tab order, keyboard navigation, and direct-ref consumers, with regression coverage for ref cleanup and Activity transitions.
@vercel

vercel Bot commented Nov 12, 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 23, 2026 12:57am UTC

Request Review

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

astracat-bot Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 23, 2026, 1:14 AM UTC

@github-actions github-actions Bot added community Authored by a community contributor (not on the eng/design team) needs:code-review High-risk change (new package/component/API) — needs human code review before merge labels Nov 12, 2026
@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · e9f4324

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
NavHeadingMenuItem 🔴 19.5 kB (+2.4 kB) · 6.7 kB CSS (0) — ✓ · ✓ · ✓
RadioListItem 79.4 kB (+486 B) · 11.2 kB CSS (0) — — · — · —
Item 21.5 kB (+468 B) · 6.2 kB CSS (0) — — · — · —
84 more components
Component Size LoC Visual · A11y · RTL
SelectorOption 25.3 kB (+449 B) · 6.8 kB CSS (0) — — · — · —
CheckboxListItem 83.3 kB (+444 B) · 12.6 kB CSS (0) — — · — · —
lab/TabBarMoreList 105.5 kB (+441 B) · 1.8 kB CSS (0) — — · — · —
ListItem 82.4 kB (+440 B) · 12.6 kB CSS (0) — — · — · —
DropdownMenuItem 29.2 kB (+400 B) · 7.1 kB CSS (0) — — · — · —
DropdownMenuRadioItem 30.1 kB (+398 B) · 7.6 kB CSS (0) — — · — · —
DropdownMenuCheckboxItem 30.1 kB (+396 B) · 7.6 kB CSS (0) — — · — · —
lab/TransferList 140.3 kB (+375 B) · 1.2 kB CSS (0) — — · — · —
DropdownMenuSubMenu 81.4 kB (+339 B) · 11.0 kB CSS (0) — — · — · —
Selector 122.1 kB (+338 B) · 19.7 kB CSS (0) — — · — · —
lab/VideoPlayer 237.2 kB (+327 B) · 2.1 kB CSS (0) — — · — · —
PowerSearch 320.9 kB (+326 B) · 27.3 kB CSS (0) — — · — · —
Table 126.7 kB (+324 B) · 21.2 kB CSS (0) — — · — · —
lab/AudioPlayer 239.6 kB (+321 B) · 1.8 kB CSS (0) — — · — · —
lab/CommentComposer 187.7 kB (+318 B) · 1.9 kB CSS (0) — — · — · —
DropdownMenu 133.7 kB (+317 B) · 19.8 kB CSS (0) — — · — · —
Markdown 211.2 kB (+312 B) · 23.5 kB CSS (0) — — · — · —
TableCell 108.3 kB (+312 B) · 20.2 kB CSS (0) — — · — · —
richtext/RichTextEditorToolbar 317.5 kB (+304 B) · 454 B CSS (0) — — · — · —
MoreMenu 134.0 kB (+299 B) · 19.8 kB CSS (0) — — · — · —
ContextMenu 107.1 kB (+297 B) · 19.6 kB CSS (0) — — · — · —
lab/TransferListSelector 152.3 kB (+297 B) · 1.4 kB CSS (0) — — · — · —
lab/MediaPlaybackRate 229.8 kB (+296 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaCaptionsButton 229.8 kB (+295 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaFullscreenButton 229.8 kB (+295 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaPlayButton 229.8 kB (+295 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaVolume 229.8 kB (+295 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaSeekButton 229.8 kB (+294 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaTime 229.8 kB (+294 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaTimeSlider 229.8 kB (+294 B) · 1.5 kB CSS (0) — — · — · —
Pagination 155.2 kB (+288 B) · 20.1 kB CSS (0) — — · — · —
ContextMenuItem 39.6 kB (+287 B) · 7.3 kB CSS (0) — — · — · —
lab/Comments 391.3 kB (+280 B) · 2.5 kB CSS (0) — — · — · —
lab/CommentThread 384.2 kB (+280 B) · 2.4 kB CSS (0) — — · — · —
TreeList 47.8 kB (+262 B) · 6.0 kB CSS (0) — — · — · —
TableHeaderCell 108.2 kB (+261 B) · 20.0 kB CSS (0) — — · — · —
BreadcrumbItem 103.5 kB (+255 B) · 14.0 kB CSS (0) — — · — · —
lab/Schedule 119.5 kB (+161 B) · 3.9 kB CSS (0) — — · — · —
Typeahead 95.4 kB (+7 B) · 14.4 kB CSS (0) — — · — · —
AlertDialog 134.6 kB (+6 B) · 16.3 kB CSS (0) — — · — · —
TopNavHeading 88.5 kB (+6 B) · 12.4 kB CSS (0) — — · — · —
TabList 48.5 kB (+3 B) · 6.8 kB CSS (0) — — · — · —
TabMenu 85.0 kB (+3 B) · 12.3 kB CSS (0) — — · — · —
Drawer 58.5 kB (+1 B) · 8.7 kB CSS (0) — — · — · —
MultiSelector 110.0 kB (+1 B) · 18.9 kB CSS (0) — — · — · —
lab/NavigationScreen 86.6 kB (+1 B) · 1.5 kB CSS (0) — — · — · —
lab/NavigationStack 86.6 kB (+1 B) · 1.5 kB CSS (0) — — · — · —
lab/TourStep 97.3 kB (+1 B) · 691 B CSS (0) — — · — · —
AvatarGroup 49.8 kB (0) · 6.1 kB CSS (0) — — · — · —
BottomSheet 76.9 kB (0) · 7.8 kB CSS (0) — — · — · —
BottomSheetSwitcher 19.6 kB (0) · 3.4 kB CSS (0) — — · — · —
ButtonGroup 45.0 kB (0) · 3.7 kB CSS (0) — — · — · —
ChatLayout 91.6 kB (0) · 11.7 kB CSS (0) — — · — · —
DateInput 209.8 kB (0) · 19.0 kB CSS (0) — — · — · —
LayoutPanel 22.4 kB (0) · 5.1 kB CSS (0) — — · — · —
Lightbox 151.6 kB (0) · 12.3 kB CSS (0) — — · — · —
SideNav 116.3 kB (0) · 12.6 kB CSS (0) — — · — · —
TableSelectionToolbar 78.5 kB (0) · 14.6 kB CSS (0) — — · — · —
TimeInput 182.2 kB (0) · 17.9 kB CSS (0) — — · — · —
Toolbar 48.4 kB (0) · 8.6 kB CSS (0) — — · — · —
TopNavMegaMenu 82.4 kB (0) · 13.1 kB CSS (0) — — · — · —
lab/CommentPin 61.9 kB (0) · 1.2 kB CSS (0) — — · — · —
lab/TabBarItem 3.9 kB (0) · 1.8 kB CSS (0) — — · — · —
ChatComposer 91.2 kB (−1 B) · 13.5 kB CSS (0) — — · — · —
Collapsible 30.1 kB (−1 B) · 4.5 kB CSS (0) — — · — · —
CommandPalette 84.2 kB (−1 B) · 13.5 kB CSS (0) — — · — · —
NavHeadingMenu 19.1 kB (−1 B) · 3.5 kB CSS (0) — ✓ · ✓ · ✓
Tokenizer 113.4 kB (−1 B) · 21.9 kB CSS (0) — — · — · —
lab/TabBar 84.7 kB (−1 B) · 1.8 kB CSS (0) — — · — · —
AppShell 92.1 kB (−2 B) · 14.9 kB CSS (0) — — · — · —
BaseTypeahead 84.5 kB (−2 B) · 12.1 kB CSS (0) — — · — · —
SegmentedControl 103.7 kB (−3 B) · 7.2 kB CSS (0) — — · — · —
SideNavHeading 88.8 kB (−4 B) · 12.5 kB CSS (0) — — · — · —
TopNavMenu 88.0 kB (−4 B) · 12.4 kB CSS (0) — — · — · —
DateRangeInput 107.0 kB (−5 B) · 14.2 kB CSS (0) — — · — · —
ComplexSelector 84.3 kB (−6 B) · 13.3 kB CSS (0) — — · — · —
Popover 106.1 kB (−6 B) · 15.5 kB CSS (0) — — · — · —
SideNavItem 83.1 kB (−6 B) · 12.3 kB CSS (0) — — · — · —
DateTimeInput 234.1 kB (−7 B) · 20.7 kB CSS (0) — — · — · —
lab/ChatEmojiPicker 129.5 kB (−7 B) · 773 B CSS (0) — — · — · —
ChatComposerInput 88.3 kB (−11 B) · 12.5 kB CSS (0) — — · — · —
ChatComposerTokenElement 88.3 kB (−11 B) · 12.5 kB CSS (0) — — · — · —
Dialog 29.0 kB (−11 B) · 7.3 kB CSS (0) — — · — · —
lab/ChatReactionBar 130.6 kB (−12 B) · 1.1 kB CSS (0) — — · — · —

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

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


Generated by PR Enrichment workflow | View full report

Keep replacement focus within its original owner, expire stale Activity handoffs, and forward non-HTML refs without treating them as focus targets. Consolidate regression tests, avoid parameterized cases, and retain only necessary comments.

@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 focus fix and the disabled-callback guard work as described, but both re-implement logic the repository already shares, and each copy already behaves differently from the shared one.

  • NavHeadingMenuItem.tsx:172-217 filters a disabled row's callbacks with its own guard instead of withholdCallerHandlers or disabledInteractionProps from utils/disabledInteraction.ts, so a disabled row still runs the caller's typing, pointer-down/up and hover callbacks that a disabled Tab or SideNavItem withholds.
  • useFocusAcrossSwap.ts:35-95 adds its own lost-focus checks (focusRoot, ownsFocus, focusIsUnclaimed) instead of calling isFocusDetached and isFocusLost, and they already disagree with those utilities about focus on <html> and about cross-origin frames.

Next, spread withholdCallerHandlers(restProps, isDisabled) as Tab and SideNavItem do, or extend that helper and say why the row should keep hover and other-key callbacks. Route the hook's checks through the shared focus utilities, and add a shadow-root case there if you need one. CI has not run on this head yet, because it waits for a maintainer to add the ci:run label.

Claims and files checked
  • Claim: focus stays on a router-link row that becomes disabled when the router does not forward refs — verified (new router test fails on the base, passes on the head).
  • Claim: a disabled row no longer runs click-capture, auxiliary-click, double-click and Enter/Space callbacks in capture and bubble phases — verified (new pointer and keyboard tests, red on the base).
  • Claim: other keys, focus and hover observation, parent menu events and label content events keep running — verified (NavHeadingMenuItem.test.tsx:237-238, :289, child-event test).
  • Claim: disabled navigation, tab order and menu keyboard movement are unchanged — verified (NavHeadingMenu.test.tsx, 46 tests, passes on the head).
  • Claim: the old focus tracking sat on the forwarded row ref — verified (base NavHeadingMenuItem.tsx).
  • Claim: the shared focus hook now attaches to the row's content span and finds the row from there — verified (NavHeadingMenuItem.tsx:168-170, :231).
  • Claim: focus is restored only while it is unclaimed, and hidden Activity content keeps no stale handoff — verified (useFocusAcrossSwap.ts:125-133, :111; hook tests).
  • Claim: existing direct-ref users of the hook are unchanged, and non-element refs are forwarded but never focused — verified (Item.tsx:677, TreeListItem.tsx:434; hook test).
  • Claim: disabled destinations stay absent, rows keep tabIndex=-1, and arrows and typeahead reach disabled rows — verified (NavHeadingMenuItem.tsx:196-198; existing tests).
  • Claim: no Link implementation, public prop, role policy, styling or layout change — verified (API surface comparison shows no change).
  • Claim: the focused suites pass (9 files, 310 tests), and ESLint and Prettier are clean — verified (rerun on the head).
  • Claim: repository-wide checks and the whitespace check pass — whitespace verified; the repository-wide checks were not re-verified.
  • Claim: public text has no internal context — verified.
  • File .changeset/ast-085-nav-heading-menu-item.md — clear (valid changeset; text matches the code).
  • File apps/storybook/stories/NavMenu.stories.tsx — clear.
  • File packages/core/src/NavMenu/NavHeadingMenuItem.tsx — finding 1.
  • File packages/core/src/NavMenu/NavHeadingMenuItem.test.tsx — finding 1 (asserts typing and hover callbacks on a disabled row).
  • File packages/core/src/utils/useFocusAcrossSwap.ts — finding 2.
  • File packages/core/src/utils/useFocusAcrossSwap.test.tsx — clear.

Automated review (maintainer link)

@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 needs an engineering owner's decision before it can be approved, and one required fix.

Owner decision: the shared isFocusLost in packages/core/src/utils/focusReturn.ts now treats focus as never lost in a cross-origin child document that does not have focus. That stops focus theft when the embedding page holds focus, but it also means that in an embedded app a focus trap (Dialog, Drawer, Popover), the removal repair, ComplexSelector or a disclosure that closes while the browser window is in the background no longer gets the shared focus return, so focus can stay on the body where it was returned before. The overlay-dismissal record returns focus "when it would otherwise be lost" and does not settle this case. An engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request (the author may do so if they are an engineering owner), or asks to keep the previous behavior there.

Required fix:

  • Regression: the changeset and the description still say a disabled row keeps other-key and hover callbacks, but NavHeadingMenuItem.tsx:174 now withholds every caller callback except onFocus and onBlur, as the new tests assert (NavHeadingMenuItem.test.tsx:249-251, :301-302); please reword both and update the evidence and test counts to this revision.

The row fix itself works: in Chromium, focus now stays on a destination that becomes unavailable under a router that drops ref, and the disabled row runs no caller callback. CI has not run on this head yet; a maintainer adds the ci:run label so it runs.

Claims and files checked
  • Claim: focus stays on a router-link row that becomes disabled when the router does not forward refs — verified (new router tests fail on the base and pass here; real-browser before/after).
  • Claim: a disabled action row no longer runs click-capture, auxiliary-click, double-click and Enter/Space callbacks — verified (it now withholds every caller callback except focus and blur).
  • Claim: other keys and hover callbacks keep running on a disabled row — false (NavHeadingMenuItem.test.tsx:249-251, :301-302).
  • Claim: parent menu events, focus callbacks and caller-rendered label events keep running — verified (keyboard and child-event tests).
  • Claim: disabled navigation, tab order and menu keyboard movement are unchanged — verified (NavHeadingMenu.test.tsx, 46 tests).
  • Claim: the focus hook attaches to the row's own content and finds the row from there — verified (NavHeadingMenuItem.tsx:168-170, :201).
  • Claim: focus is restored only while it is unclaimed, and hidden Activity content keeps no stale handoff — verified (useFocusAcrossSwap.ts:79-88; hook tests).
  • Claim: existing direct-ref users of the hook are unchanged, and non-element refs are forwarded but never focused — verified (Item.tsx:677, TreeListItem.tsx:434; hook test).
  • Claim: disabled destinations stay absent, rows keep tabIndex=-1, and arrows and typeahead reach disabled rows — verified.
  • Claim: no Link implementation, public prop, role policy, styling or layout change — verified (API surface comparison shows no change).
  • Claim: the before/after recordings and the real-browser comparison — they describe the previous revision; the same before/after results reproduce on this head in Chromium.
  • Claim: the focused suites pass (9 files, 310 tests) — stale: the same command runs 313 tests on this head, all passing.
  • Claim: ESLint, Prettier, changeset and whitespace checks pass — verified; the other repository-wide checks were not re-run.
  • Claim: public text has no internal context — verified.
  • File .changeset/ast-085-nav-heading-menu-item.md — required fix (stale claim).
  • File apps/storybook/stories/NavMenu.stories.tsx — clear.
  • File packages/core/src/NavMenu/NavHeadingMenuItem.tsx — clear.
  • File packages/core/src/NavMenu/NavHeadingMenuItem.test.tsx — clear.
  • File packages/core/src/utils/focusReturn.ts — owner decision (cross-origin rule).
  • File packages/core/src/utils/focusReturn.test.ts — clear.
  • File packages/core/src/utils/useFocusAcrossSwap.ts — clear.
  • File packages/core/src/utils/useFocusAcrossSwap.test.tsx — clear (a nested-row Activity case would pin the cleanup Effect).

Automated review (maintainer link)

Comment thread packages/core/src/utils/focusReturn.ts Resolved

@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 one engineering-owner decision and one required fix.

  • Owner decision: in a cross-origin iframe whose document does not have focus, a NavHeadingMenuItem, Item or TreeListItem row that becomes disabled no longer gets focus back on its replacement (focusRoot in packages/core/src/utils/focusReturn.ts), which spec:AST-085 FR4 does not settle, so an engineering owner either accepts that rule by commenting /approve-spec <full head SHA> (the author may do so if they are an engineering owner) or asks for the base behavior in that state.
  • Required fix: the description still says the disabled-items story is updated and lists that story under Scope, but no story file changes at this head, so remove those mentions (or restore the story change) and point the Testing section at this head.

The row fix itself works: the new router tests fail before this change and pass with it, and in Chromium focus stays on a disabled row while no caller callback runs on it. CI has not run on this head yet; a maintainer adds the ci:run label so it runs.

Claims and files checked
  • Claim: a router that drops its ref loses focus when the focused row becomes disabled (before) — verified by the new router tests failing before the change.
  • Claim: a disabled action row still ran caller key, pointer and hover callbacks (before) — verified.
  • Claim: the row attaches the shared focus hook to its own content span — verified.
  • Claim: a replacement takes focus only while focus is unclaimed — verified.
  • Claim: a hidden Activity does not keep a stale focus hand-off — verified, but the test fails only when both guards are removed.
  • Claim: disabled rows withhold caller callbacks except focus and blur, keeping parent menu handling and caller label events — verified.
  • Claim: isFocusLost keeps its base behavior for overlays, disclosures and removal repair — verified.
  • Claim: the existing direct-ref callers keep their calls, and non-element refs are forwarded but not focused — verified.
  • Claim: the disabled-items story is updated (restoration list and Scope) — false; no story file changes.
  • Claim: disabled destinations stay absent, rows keep tabIndex=-1, arrows and typeahead still reach disabled rows — verified.
  • Claim: no public prop, role, styling or layout change — verified.
  • Claim: the focused test run passes (10 files, 349 tests) — verified at this head; the description names an earlier commit.
  • Claim: a removal regression keeps document-local return in an unfocused cross-origin document — verified.
  • Claim: a Chromium cross-origin iframe check was run — stated by the author, not reproduced.
  • Changeset: focus is preserved with routers that do not forward refs — verified.
  • Changeset: disabled items withhold caller callbacks except focus and blur, keeping parent menu handling and child events — verified.
  • Changeset: disabled navigation, tab order and menu keyboard movement are unchanged — verified.
  • File .changeset/ast-085-nav-heading-menu-item.md — clear.
  • File packages/core/src/NavMenu/NavHeadingMenuItem.tsx — clear.
  • File packages/core/src/NavMenu/NavHeadingMenuItem.test.tsx — clear.
  • File packages/core/src/utils/focusReturn.ts — owner decision on the cross-origin rule.
  • File packages/core/src/utils/focusReturn.test.ts — clear.
  • File packages/core/src/utils/useFocusAcrossSwap.ts — clear.
  • File packages/core/src/utils/useFocusAcrossSwap.test.tsx — non-blocking: the hidden-Activity test does not isolate either guard.

Automated review (maintainer link)

Comment thread packages/core/src/utils/focusReturn.ts Resolved
@korkt-kim
korkt-kim marked this pull request as draft November 14, 2026 06:50
@korkt-kim
korkt-kim marked this pull request as ready for review November 14, 2026 06:50

@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 disabled-row focus and callback fixes work as described, and one shared focus check needs a fix before this can merge.

  • Miss: ownsFocus and isFocusUnclaimed treat any root with a host property as a shadow root (packages/core/src/utils/focusReturn.ts:40, :49), but a document exposes named form, iframe, img, embed and object elements as properties, so on a page with <form name="host"> a focused NavHeadingMenuItem, Item or TreeListItem row that becomes unavailable now drops focus to the page body where it used to stay (AST-085 FR4); use the shared isShadowRoot from utils/nodeType.ts (or shadowHostOf from utils/flatTree.ts) at both sites and add a test that defines host on the document, since jsdom has no named document properties.

Everything else checked out: the router and callback tests fail before this change and pass with it, and the unfocused cross-origin case keeps the earlier behavior.

Claims and files checked
  • Verified: focus stays on a row that becomes unavailable under a router that does not forward its ref (except on a page with a named host element, above).
  • Verified: a disabled row runs no caller callback except focus and blur, while menu-level keyboard handling and caller-rendered label content keep working.
  • Verified: disabled destinations, the row's tab order and arrow and typeahead reach are unchanged.
  • Verified: the hook attaches to the row's own content span and restores focus only when no other element holds it, across frames and shadow roots.
  • Verified: hidden Activity content keeps no stale focus handoff, and removing the cleanup Effect fails the nested test.
  • Verified: isFocusLost is unchanged, and an unfocused child document with an unreadable parent keeps the document-local rule; re-adding the window-focus guard fails its test.
  • Verified: non-element refs are forwarded but never focused, and unused handoffs expire.
  • Verified: no public prop, story, styling or layout change.
  • Verified: the listed focused test runs (10 files, 349 tests; 5 files, 168 selected tests), the Core typecheck, and lint and formatting on the changed files; the full repository lint and build were not rerun here.
  • Verified with a different count: the recording's eight keyboard callbacks come from the author's fixture; the behavior reproduces.
  • Files: changeset, NavHeadingMenuItem.tsx, NavHeadingMenuItem.test.tsx, useFocusAcrossSwap.ts, useFocusAcrossSwap.test.tsx and focusReturn.test.ts are clear; focusReturn.ts has the finding above.

Automated review (maintainer link)

Comment thread packages/core/src/utils/focusReturn.ts Resolved
@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec e632b8b

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved pending CI: the heavy CI jobs have not run on this head yet, so the merge guard still waits for them. A focused NavHeadingMenuItem now keeps focus when it becomes unavailable under a router link that drops ref, and a disabled row runs none of the caller's event callbacks except focus and blur; a Chromium check of this patch confirms both, and each guard in the shared swap hook has a test that fails without it. One optional follow-up, already tracked in #13123:

  • The restore at useFocusAcrossSwap.ts line 86 calls plain focus(), so after a mouse click the restored row draws the keyboard focus ring; restoring through focusForLastInput would fix it for every swap caller.
Claims and files checked

Review mode: carry-forward; reason: none

  • Changeset: focus is kept across disabled transitions under router links that do not forward refs: verified (NavHeadingMenuItem.test.tsx:30, :81; Chromium keeps focus on the row where the base drops it to the page body).
  • Changeset: disabled items withhold caller event callbacks except focus and blur: verified (NavHeadingMenuItem.tsx:180; tests at NavHeadingMenuItem.test.tsx:154, :213, :263; Chromium counts 16 callbacks on the base and 0 here).
  • Changeset: parent menu handling and caller-rendered child events are preserved: verified (NavHeadingMenuItem.test.tsx:213, :263).
  • Changeset: disabled navigation, tab order and menu keyboard movement are unchanged: verified (NavHeadingMenuItem.tsx:187-189; the NavMenu suite passes).
  • Description: on the base, a non-forwarding router drops focus to the page and a disabled action runs caller keyboard, pointer and hover callbacks: verified (Chromium on the base).
  • Description: the item attaches the shared focus hook to its content span and finds the row from there: verified (NavHeadingMenuItem.tsx:100-102, :174-176, :208).
  • Description: a replacement takes focus only while focus is unclaimed in the roots the hook can read, and hidden Activity content keeps no stale handoff: verified (useFocusAcrossSwap.ts:78-87, focusReturn.ts:59-88; removing the Effect cleanup fails useFocusAcrossSwap.test.tsx:238).
  • Description: isFocusLost keeps the base's document-local behavior for overlays, disclosures and removal repair: verified (unchanged at focusReturn.ts:96-102).
  • Description: with an unreadable cross-origin parent, row swaps keep the document-local answer and do not reject on hasFocus(): verified (focusReturn.ts:79-81; adding such a check fails focusReturn.test.ts:458).
  • Description: both ownership checks use isShadowRoot, so a document's named host element is not taken for a shadow host: verified (focusReturn.ts:54, :63; reverting either fails focusReturn.test.ts:422).
  • Description: the disabled mouse-down guard stays without reattaching the caller's handler: verified (NavHeadingMenuItem.tsx:181-183).
  • Description: direct-ref callers keep their call shape, non-HTML refs are forwarded but never focused, and unconsumed handoffs expire: verified (Item.tsx:674, TreeListItem.tsx:444 and Pagination.tsx:424 call the hook unchanged; useFocusAcrossSwap.ts:27-34, :93-101; tests at useFocusAcrossSwap.test.tsx:96, :276).
  • Description: the focusReturn.ts header names the ownership checks and the row-swap caller: verified (focusReturn.ts:7-17).
  • Description: item and shared-focus regression tests and a Core patch changeset are added: verified (file list).
  • Description: disabled destinations stay absent, rows keep tabIndex=-1, and arrows and typeahead still reach disabled rows: verified (NavHeadingMenuItem.tsx:187-189; NavMenu suite).
  • Description: no Link implementation, public prop, role policy, styling, layout or story change: verified (file list; the built API surface shows no change; the only other edit is two import paths).
  • Description: after re-enabling, Enter navigates once and the menu closes once: verified (NavHeadingMenuItem.test.tsx:30).
  • Description: the regression tests catch a removed Effect cleanup, a restored hasFocus() check and a property-presence shadow-root check: verified (each change fails its test on this patch).
  • Description: the two maintainer tests each fail without the guard they cover: verified (removing the hidden-row guard fails useFocusAcrossSwap.test.tsx:260; removing the expiry fails :276).
  • Description: the utils, NavHeadingMenu and Item suites, Core typecheck, ESLint and Prettier pass: consistent (617 tests across 16 files with Item, TreeList and Pagination; typecheck, lint and formatting of the changed files pass on this patch).
  • Description: recordings and Chromium checks describe earlier revisions with the same functional code: consistent (Chromium on this patch shows the same focus and callback results).
  • Description: a restored row receives plain focus(), so after a mouse click it can draw the keyboard ring, and a follow-up is filed: verified (useFocusAcrossSwap.ts:86; Chromium pointer probe on this patch; #13123).
  • Files: .changeset/ast-085-nav-heading-menu-item.md, NavHeadingMenuItem.tsx, NavHeadingMenuItem.test.tsx, focusReturn.ts, focusReturn.test.ts, useFocusAcrossSwap.test.tsx: each clear; useFocusAcrossSwap.ts: one non-blocking note (keyboard ring after pointer input).

Automated review (maintainer link)

@korkt-kim
korkt-kim marked this pull request as ready for review November 21, 2026 11:38
@cixzhang
cixzhang marked this pull request as draft November 21, 2026 18:39
@cixzhang
cixzhang marked this pull request as ready for review November 21, 2026 18:39
@github-actions github-actions Bot removed the needs:code-review High-risk change (new package/component/API) — needs human code review before merge label Nov 21, 2026
@cixzhang

Copy link
Copy Markdown
Contributor

(Posted by Cindy's agent.) Thanks @korkt-kim, this is approved and passing CI. It's waiting for two in-flight menu PRs to land first, since it touches shared menu code they depend on. After they merge, we'll bring your branch up to date with main (keeping your commits and credit), re-check it, and merge. No action needed from you.

@cixzhang
cixzhang marked this pull request as draft November 22, 2026 19:01
@github-actions github-actions Bot added the needs:code-review High-risk change (new package/component/API) — needs human code review before merge label Nov 22, 2026
@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec d55862d

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved pending CI: the heavy CI jobs have not run on this head yet, so the merge guard still waits for them. A focused NavHeadingMenuItem now keeps focus when it becomes unavailable under a router link that drops ref, and a disabled row runs none of the caller's event callbacks except focus and blur; a Chromium check of this head confirms both, and each guard in the shared swap hook has a test that fails without it. One optional follow-up, already tracked in #13123:

  • The restore at useFocusAcrossSwap.ts line 86 calls plain focus(), so after a mouse click the restored row draws the keyboard focus ring; restoring through focusForLastInput would fix it for every swap caller.
Claims and files checked

Review mode: full; reason: author-not-engowner

  • Changeset: focus is kept across disabled transitions under router links that do not forward refs: verified (NavHeadingMenuItem.test.tsx:30, :81, both failing on the base; Chromium keeps focus on the row where the base drops it to the page body).
  • Changeset: disabled items withhold caller event callbacks except focus and blur: verified (NavHeadingMenuItem.tsx:180; tests at NavHeadingMenuItem.test.tsx:154, :213, :263, each failing on the base; Chromium counts 14 callbacks on the base and 0 here).
  • Changeset: parent menu handling and caller-rendered child events are preserved: verified (NavHeadingMenuItem.test.tsx:213, :263).
  • Changeset: disabled navigation, tab order and menu keyboard movement are unchanged: verified (NavHeadingMenuItem.tsx:185-189; the NavMenu suite passes).
  • Description: on the base, a non-forwarding router drops focus to the page and a disabled action runs caller keyboard, pointer and hover callbacks: verified (Chromium on the base).
  • Description: the item attaches the shared focus hook to its content span and finds the row from there: verified (NavHeadingMenuItem.tsx:100-102, :174-176, :208).
  • Description: a replacement takes focus only while focus is unclaimed in the roots the hook can read, and hidden Activity content keeps no stale handoff: verified (useFocusAcrossSwap.ts:78-87, focusReturn.ts:59-88; removing the Effect cleanup fails useFocusAcrossSwap.test.tsx:238).
  • Description: isFocusLost keeps the base's document-local behavior for overlays, disclosures and removal repair: verified (unchanged at focusReturn.ts:96-102).
  • Description: with an unreadable cross-origin parent, row swaps keep the document-local answer and do not reject on hasFocus(): verified (focusReturn.ts:79-81; adding such a check fails focusReturn.test.ts:458).
  • Description: both ownership checks use isShadowRoot, so a document's named host element is not taken for a shadow host: verified (focusReturn.ts:54, :63; reverting either fails focusReturn.test.ts:422).
  • Description: the disabled mouse-down guard stays without reattaching the caller's handler: verified (NavHeadingMenuItem.tsx:181-183).
  • Description: direct-ref callers keep their call shape, non-HTML refs are forwarded but never focused, and unconsumed handoffs expire: verified (Item.tsx:675, TreeListItem.tsx:444 and Pagination.tsx:424 call the hook unchanged; useFocusAcrossSwap.ts:27-34, :93-101; tests at useFocusAcrossSwap.test.tsx:96, :276).
  • Description: the focusReturn.ts header names the ownership checks and the row-swap caller: verified (focusReturn.ts:7-17).
  • Description: item and shared-focus regression tests and a Core patch changeset are added: verified (file list).
  • Description: disabled destinations stay absent, rows keep tabIndex=-1, and arrows and typeahead still reach disabled rows: verified (NavHeadingMenuItem.tsx:185-189; NavMenu suite).
  • Description: no Link implementation, public prop, role policy, styling, layout or story change: verified (file list; the built API surface shows no change; the only other edit is two import paths).
  • Description: after re-enabling, Enter on the router row navigates once and closes the menu once, and the action row runs its selection again: verified (NavHeadingMenuItem.test.tsx:30, :154).
  • Description: the regression tests catch a removed Effect cleanup, a restored hasFocus() check and a property-presence shadow-root check: verified (each change fails its test on this head).
  • Description: the two maintainer tests each fail without the guard they cover: verified (removing the hidden-row guard fails useFocusAcrossSwap.test.tsx:260; removing the expiry fails :276).
  • Description: the named-document fix keeps focus for NavHeadingMenuItem, Item and TreeListItem rows: consistent (focusReturn.test.ts:422 and both reverts; not re-run in a browser).
  • Description: the utility, NavHeadingMenu and Item suites, Core typecheck, ESLint and Prettier pass: verified (1,909 tests across 83 files with TreeList and Pagination; typecheck passes; ESLint and Prettier are clean on the changed files).
  • Description: recordings and Chromium checks describe earlier revisions with the same functional code: consistent (Chromium on this head shows the same focus and callback results).
  • Description: a restored row receives plain focus(), so after a mouse click it can draw the keyboard ring, and a follow-up is filed: verified (useFocusAcrossSwap.ts:86; Chromium pointer probe on this head; #13123 is open).
  • Files: .changeset/ast-085-nav-heading-menu-item.md, NavHeadingMenuItem.tsx, NavHeadingMenuItem.test.tsx, focusReturn.ts, focusReturn.test.ts, useFocusAcrossSwap.test.tsx: each clear; useFocusAcrossSwap.ts: one non-blocking note (keyboard ring after pointer input).

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as ready for review November 22, 2026 20:16
@cixzhang
cixzhang marked this pull request as draft November 23, 2026 00:46
@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec e9f4324

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved pending CI: CI has not run on this head yet (the pull request is still a draft, so every CI job was skipped), and the merge guard waits for it. A focused NavHeadingMenuItem now keeps focus when it becomes unavailable under a router link that drops ref, and a disabled row runs none of the caller's event callbacks except focus and blur; a Chromium check of this head confirms both, and each guard in the shared swap hook has a test that fails without it. One optional follow-up, already tracked in #13123:

  • The restore at useFocusAcrossSwap.ts line 86 calls plain focus(), so after a mouse click the restored row draws the keyboard focus ring; restoring through focusForLastInput would fix it for every swap caller.
Claims and files checked

Review mode: full; reason: author-not-engowner

  • Changeset: focus is kept across disabled transitions under router links that do not forward refs: verified (NavHeadingMenuItem.test.tsx:30, :81, both failing on the base; Chromium keeps focus on the row where the base drops it to the page body).
  • Changeset: disabled items withhold caller event callbacks except focus and blur: verified (NavHeadingMenuItem.tsx:180; tests at NavHeadingMenuItem.test.tsx:154, :213, :263, each failing on the base; Chromium counts 14 callbacks on the base and 0 here).
  • Changeset: parent menu handling and caller-rendered child events are preserved: verified (NavHeadingMenuItem.test.tsx:213, :263).
  • Changeset: disabled navigation, tab order and menu keyboard movement are unchanged: verified (NavHeadingMenuItem.tsx:185-189; the NavMenu, SideNav and TopNav suites pass).
  • Description: on the base, a non-forwarding router drops focus to the page and a disabled action runs caller keyboard, pointer and hover callbacks: verified (Chromium on the base).
  • Description: the item attaches the shared focus hook to its content span and finds the row from there: verified (NavHeadingMenuItem.tsx:100-102, :174-176, :208).
  • Description: a replacement takes focus only while focus is unclaimed in the roots the hook can read, and hidden Activity content keeps no stale handoff: verified (useFocusAcrossSwap.ts:78-87, focusReturn.ts:59-88; removing the Effect cleanup fails useFocusAcrossSwap.test.tsx:238).
  • Description: isFocusLost keeps the base's document-local behavior for overlays, disclosures and removal repair: verified (unchanged at focusReturn.ts:96-102).
  • Description: with an unreadable cross-origin parent, row swaps keep the document-local answer and do not reject on hasFocus(): verified (focusReturn.ts:54, :79-81; adding such a check fails focusReturn.test.ts:458).
  • Description: both ownership checks use isShadowRoot, so a document's named host element is not taken for a shadow host: verified (focusReturn.ts:54, :63; reverting either fails focusReturn.test.ts:422).
  • Description: the disabled mouse-down guard stays without reattaching the caller's handler: verified (NavHeadingMenuItem.tsx:181-183).
  • Description: direct-ref callers keep their call shape, non-HTML refs are forwarded but never focused, and unconsumed handoffs expire: verified (Item.tsx:675, TreeListItem.tsx:444 and Pagination.tsx:424 call the hook unchanged; useFocusAcrossSwap.ts:27-34, :93-101; tests at useFocusAcrossSwap.test.tsx:96, :276).
  • Description: the focusReturn.ts header names the ownership checks and the row-swap caller: verified (focusReturn.ts:7-17).
  • Description: item and shared-focus regression tests and a Core patch changeset are added: verified (file list).
  • Description: disabled destinations stay absent, rows keep tabIndex=-1, and arrows and typeahead still reach disabled rows: verified (NavHeadingMenuItem.tsx:187-189; NavMenu suite).
  • Description: no Link implementation, public prop, role policy, styling, layout or story change: verified (file list; the built API surface shows no change; the only other edit is two import paths).
  • Description: after re-enabling, Enter on the router row navigates once and closes the menu once, and the action row runs its selection again: verified (NavHeadingMenuItem.test.tsx:30, :154).
  • Description: the regression tests catch a removed Effect cleanup, a restored hasFocus() check and a property-presence shadow-root check in either function: verified (each change fails its test on this head).
  • Description: the two maintainer tests each fail without the guard they cover: verified (removing the hidden-row guard fails useFocusAcrossSwap.test.tsx:260; removing the expiry fails :276).
  • Description: the named-document fix keeps focus for NavHeadingMenuItem, Item and TreeListItem rows: consistent (focusReturn.test.ts:422 and both reverts; not re-run in a browser).
  • Description: the utility, NavHeadingMenu and Item suites, Core typecheck, ESLint, Prettier and the full build pass: verified (2,572 tests across 93 files with SideNav, TopNav, TreeList and Pagination; typecheck, ESLint and Prettier clean; the root build passes).
  • Description: recordings and Chromium checks describe earlier revisions with the same functional code: consistent (Chromium on this head shows the same focus and callback results).
  • Description: a restored row receives plain focus(), so after a mouse click it can draw the keyboard ring, and a follow-up is filed: verified (useFocusAcrossSwap.ts:86; Chromium pointer probe on this head; #13123 is open).
  • Files: .changeset/ast-085-nav-heading-menu-item.md, NavHeadingMenuItem.tsx, NavHeadingMenuItem.test.tsx, focusReturn.ts, focusReturn.test.ts, useFocusAcrossSwap.test.tsx: each clear; useFocusAcrossSwap.ts: one non-blocking note (keyboard ring after pointer input).

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as ready for review November 23, 2026 01:19
@cixzhang
cixzhang marked this pull request as draft November 23, 2026 01:22
@cixzhang
cixzhang marked this pull request as ready for review November 23, 2026 01:23
@github-actions github-actions Bot removed the needs:code-review High-risk change (new package/component/API) — needs human code review before merge label Nov 23, 2026
@cixzhang
cixzhang merged commit b795fac into meta:main Nov 23, 2026
238 of 288 checks passed
@cixzhang

Copy link
Copy Markdown
Contributor

🤖 (Posted by Cindy's agent.) Merged, thank you @korkt-kim, and thanks for your patience while the shared menu work landed first! In a NavHeadingMenu, a disabled row now keeps focus so keyboard users can still reach and read it, but it can't be activated. A small follow-up, #13123, will make a restored row skip the keyboard focus ring after a mouse click. It ships in the next release, with you credited.

@github-actions
github-actions Bot deleted the korkt-kim/ast-085-nav-heading-menu-item branch November 23, 2026 16:39

This branch was successfully deployed

1 active deployment
Preview — e9f43242 Deployed Nov 23, 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. community Authored by a community contributor (not on the eng/design team) lane:1 Astryx fix-loop lane 1 owns this

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants