Repository navigation
spec(DropdownMenu, AST-094): the menu grows out of its trigger under a finger (FR21); a phone menu stays beside its trigger (DEC-19) - #8515
Conversation
… of its trigger and closes on a pan outside
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report
|
There was a problem hiding this comment.
This proposal needs an engineering owner's decision before it can be approved. FR21 adds requirements to the draft DropdownMenu record that no current spec states yet (a pinned presentation="popover" keeps the layer's own entrance, and a pan dismissal returns focus to the Trigger button), and it leaves open whether the grow belongs in the layer-runtime INV15 lift module or INV15 is amended for a component-owned menu grow. Before that decision, please fix two things in the record:
- FR21 says it is verified in jsdom and Chromium, but the tests it cites (
menuSurfaceMotion.test.ts,__tests__/DropdownMenuTouchMotion.interaction.browser.spec.tsand touch-motion cases inDropdownMenu.test.tsx) are not on this branch, and FR5 still calls the same behavior pending implementation. - FR21 drops AST-094 FR31's "Under a finger" condition, so it never says a mouse keeps the layer's entrance, which AST-094 requires and its verification row tests.
After that, an engineering owner records the decision on the updated head by commenting /approve-spec <full head SHA> on this pull request; the author may do so if they are an engineering owner.
[Automated review]
| | FR16 | `DropdownMenuCheckboxItem` MUST expose one `menuitemcheckbox` row whose `aria-checked` equals its controlled value; enabled activation reports `!value`, stays open by default, and composes consumer click and pointer-move handlers with owned activation and hover focus. Disabled activation calls no consumer activation handler. | Released subcomponent API; `architecture:public-component-api/INV5–INV8`; `DropdownMenuSelectable.test.tsx` | Verified current behavior; consumer handlers are preserved | | ||
| | FR17 | Disabled menu rows SHOULD remain keyboard-discoverable while activation stays blocked. Current shared `useListFocus` deliberately skips every `aria-disabled` row, including checkbox items. | WAI-ARIA Menu pattern; current shared navigation source/tests | Objective mismatch; shared mechanism remains undecided in OQ1 | | ||
| | FR20 | With `header` or `footer` on a sub-menu (`DropdownMenuSubMenu`), its surface is a modal dialog named by its row (AR7), holding the header, the sub-menu's `role="menu"` (rows only), then the footer. It sits in a host `DropdownMenu` renders beside its menu, never inside a menu; under a root with no such host (`ContextMenu`) the sub-menu shows its rows alone. On a fine pointer the dialog is the flyout; on a compact touch display, the drilled-in view, which replaces the root's menu and regions until popped. A region keeps its own keys and presses. The rows are one Tab stop: Tab and Shift+Tab walk the header's controls, the rows, then the footer's, and wrap; from a deeper flyout, that flyout closes and the walk goes on from the rows. An open lands as for any sub-menu (FR11, FR12), not on a region. Escape in the dialog, outside an IME composition and unless a control there handled it, returns focus to the row and leaves the root open. A pointer leaving the flyout keeps it open until focus leaves, and it closes with the flyout holding its row. Without either prop nothing changes. | Proposed DEC-13; FR15; AR5 | Proposed; verified in jsdom and Chromium, pending owner review | | ||
| | FR21 | Under the touch modes (`presentation` not pinned to `'popover'`), the pointer menu grows out of the Trigger button and collapses back into it (`spec:AST-094` FR31), and closes on a pan that starts outside it (FR32); a pinned `'popover'` keeps the layer's own entrance. A pan dismissal is the menu's own close: focus that was in the menu returns to the Trigger button, whose `aria-expanded` turns false. | Proposed; `spec:AST-094` FR31, FR32; `family:overlay-dismissal` AV6 | Proposed; verified in jsdom and Chromium, pending owner review | |
There was a problem hiding this comment.
FR21 drops AST-094 FR31's "Under a finger" condition. "The touch modes" is glossed by presentation alone, so a mouse opening an un-pinned menu while the touch presentation applies would grow it, against AST-094's "A mouse keeps today's behavior". Suggested wording: "Under a finger, with presentation not pinned to 'popover', …; a mouse and a pinned 'popover' keep the layer's own entrance." The state "verified in jsdom and Chromium" also needs to read "pending implementation" until the tests land, as FR5 does.
| | FR10 | `DropdownMenuSubMenu.test.tsx` safe-triangle suite; `useMenuHover.test.tsx` `isPointInSafeTriangle` and click-guard suites | diagonal path toward the flyout, a pause inside it, path away, click-opened and hover-opened guard windows | A flyout that closes while the pointer is inside the triangle or paused in it, one that never closes after leaving it, or a changed guard-window rule, fails. | `audit:DropdownMenu/behavior` | | ||
| | FR15 | `DropdownMenu.test.tsx` header and footer suite; `__tests__/MenuHeaderFooter.a11y.chromium.spec.ts` in real Chromium | dialog role, modality, name and trigger wiring; regions outside the menu element; typing in a header field; Tab walk header → menu → footer with wrap at both ends; Tab and Shift+Tab from an open sub-menu; hidden and hidden-wrapper controls; Escape from the header; a finger tap on a footer button; bottom sheet order; no regions | A region rendered inside the menu element, a popover with regions that is not a named modal dialog, a trigger still saying `aria-haspopup="menu"` with regions, a header key taken by typeahead, a Tab that leaves the dialog or closes it, focus stranded outside the dialog, or a footer tap swallowed by the press model fails. | | ||
| | FR16 | `DropdownMenuSelectable.test.tsx`, source inspection, scoped `pr-a11y` over the `a11y/Checkbox pattern` stories, and owned Storybook states | checked, unchecked, disabled, caller click/pointer handlers, marker size and ownership | A dropped consumer handler, wrong checked state, nested semantic checkbox, disabled activation, or menu that closes by default fails. | `audit:DropdownMenuCheckboxItem/behavior` | | ||
| | FR21 | `DropdownMenu.test.tsx` touch motion and pan-outside cases; `menuSurfaceMotion.test.ts`; `__tests__/DropdownMenuTouchMotion.interaction.browser.spec.ts` | open, close, an interrupted open and close, Reduce Motion, a mouse; a tap, a hold and a pan outside; focus in the menu at a pan dismissal | A pinned `'popover'` that animates, a pan outside that leaves the menu open, or focus left in a hidden menu fails | |
There was a problem hiding this comment.
None of these references exists on this branch: DropdownMenu.test.tsx has no touch-motion or pan-outside case, and menuSurfaceMotion.test.ts and __tests__/DropdownMenuTouchMotion.interaction.browser.spec.ts are not in the tree. Land this row with the tests, or mark FR21 pending. The failure expectation should also cover "a mouse that grows the menu", as AST-094's own FR31–FR33 row fails "a changed mouse path".
…r their own spec change (meta#8515) From review: record text lands only through an approved spec pull request, and meta#8515 proposes DropdownMenu FR21 (the grow and collapse under a finger, the pan-outside dismissal) on its own. The behavior and its tests stay here; the record's FR21 and its verification row go.
|
Posted by Cindy's agent on her behalf. Thanks for the menu work. Cindy's decisions on menus on phones:
So the covering placement comes out of the covering-menu PR and the rest of it stays, and the grow-from-trigger PRs proceed. The record amendment follows in its own spec PR. |
…eside its trigger (DEC-19, OQ9 resolved)
|
/approve-spec 33343e5 |
There was a problem hiding this comment.
The owner decisions in FR21 and DEC-19 are approved, but the record text needs a few fixes before this can land. FR21 is marked "verified in jsdom and Chromium" while none of the tests its verification row cites exists on this branch and FR5 still calls the same grow pending implementation, so please mark FR21 pending (or land it with its tests), add AST-094's "Under a finger" condition and mouse rule to FR21 and its failure expectation, bound DEC-19's "so the trigger stays visible" (a menu taller than the room on either side can cover its trigger or run off-screen), and name FR21 beside FR29 in the compatibility section. A new commit resets the approval, so an engineering owner then records it again by commenting /approve-spec <full head SHA> on the new head; the author may do so as an engineering owner.
[Automated review]
| | FR16 | `DropdownMenuCheckboxItem` MUST expose one `menuitemcheckbox` row whose `aria-checked` equals its controlled value; enabled activation reports `!value`, stays open by default, and composes consumer click and pointer-move handlers with owned activation and hover focus. Disabled activation calls no consumer activation handler. | Released subcomponent API; `architecture:public-component-api/INV5–INV8`; `DropdownMenuSelectable.test.tsx` | Verified current behavior; consumer handlers are preserved | | ||
| | FR17 | Disabled menu rows SHOULD remain keyboard-discoverable while activation stays blocked. Current shared `useListFocus` deliberately skips every `aria-disabled` row, including checkbox items. | WAI-ARIA Menu pattern; current shared navigation source/tests | Objective mismatch; shared mechanism remains undecided in OQ1 | | ||
| | FR20 | With `header` or `footer` on a sub-menu (`DropdownMenuSubMenu`), its surface is a modal dialog named by its row (AR7), holding the header, the sub-menu's `role="menu"` (rows only), then the footer. It sits in a host `DropdownMenu` renders beside its menu, never inside a menu; under a root with no such host (`ContextMenu`) the sub-menu shows its rows alone. On a fine pointer the dialog is the flyout; on a compact touch display, the drilled-in view, which replaces the root's menu and regions until popped. A region keeps its own keys and presses. The rows are one Tab stop: Tab and Shift+Tab walk the header's controls, the rows, then the footer's, and wrap; from a deeper flyout, that flyout closes and the walk goes on from the rows. An open lands as for any sub-menu (FR11, FR12), not on a region. Escape in the dialog, outside an IME composition and unless a control there handled it, returns focus to the row and leaves the root open. A pointer leaving the flyout keeps it open until focus leaves, and it closes with the flyout holding its row. Without either prop nothing changes. | Proposed DEC-13; FR15; AR5 | Proposed; verified in jsdom and Chromium, pending owner review | | ||
| | FR21 | Under the touch modes (`presentation` not pinned to `'popover'`), the pointer menu grows out of the Trigger button and collapses back into it (`spec:AST-094` FR31), and closes on a pan that starts outside it (FR32); a pinned `'popover'` keeps the layer's own entrance. A pan dismissal is the menu's own close: focus that was in the menu returns to the Trigger button, whose `aria-expanded` turns false. | Owner decision, 2026-10-26; `spec:AST-094` FR31, FR32; `family:overlay-dismissal` AV6 | Decided; verified in jsdom and Chromium | |
There was a problem hiding this comment.
FR21's state reads "Decided; verified in jsdom and Chromium", but none of the verification on line 342 exists on this branch: DropdownMenu.test.tsx has no touch-motion or pan-outside case, and menuSurfaceMotion.test.ts and __tests__/DropdownMenuTouchMotion.interaction.browser.spec.ts are absent. FR5 above still calls the same grow "(pending implementation)". Suggest "Decided; pending implementation" until the tests land.
The gate also drops AST-094 FR31's "Under a finger" and its section's "A mouse keeps today's behavior". Suggest: "Under a finger, with presentation not pinned to 'popover', …; a mouse and a pinned 'popover' keep the layer's own entrance", plus "a mouse that grows the menu" in the failure expectation on line 342.
| On a compact touch screen an anchored menu keeps the layer runtime's normal | ||
| placement beside its trigger, inside the viewport gutter, so the trigger stays | ||
| visible while the menu is open. |
There was a problem hiding this comment.
The layer runtime does not promise this. spec:AST-059 FR4 shifts content taller than either side into the viewport, and only a layer that keeps its anchor clear (Tooltip) never settles over its anchor. A 300px-tall menu on a phone held in landscape fits neither above nor below a mid-screen trigger: Chromium shifts it over the trigger and WebKit leaves it partly off-screen. Suggest dropping the clause, or bounding it: "so the trigger stays visible whenever the menu fits beside it".
…ion, mouse rule; DEC-19 bounded
|
/approve-spec 791cf0d |
|
/approve-spec 95fbd9d |
There was a problem hiding this comment.
An engineering owner approved this exact head, and the FR21 and DEC-19 text now agrees with the current records it builds on: AST-094 FR31 and FR32, the presentation="popover" way back in the public-component-api architecture, and the layer runtime's fallback for a menu taller than the room beside its trigger. The four record fixes requested on the previous head are all in, so nothing further is needed here. One note for the implementing change: FR21 names no module for the grow, so that change still has to use the layer-runtime INV15 lift module or carry an INV15 amendment.
[Automated review]
|
/approve-spec 37551a3 |
There was a problem hiding this comment.
This spec change looks good to land: an engineering owner approved this exact revision, and FR21 and DEC-19 agree with the current records they build on (AST-094 FR31 and FR32, the presentation="popover" way back in the public-component-api architecture, and the layer runtime's placement and fallback). The merge of main changed nothing either record rests on. Two optional follow-ups: FR21's verification row could also fail a finger open that never grows, as AST-094's own FR31-FR33 row does, and the implementing change still has to place the grow in the layer-runtime INV15 lift module or carry an INV15 amendment.
[Automated review]
| | FR10 | `DropdownMenuSubMenu.test.tsx` safe-triangle suite; `useMenuHover.test.tsx` `isPointInSafeTriangle` and click-guard suites | diagonal path toward the flyout, a pause inside it, path away, click-opened and hover-opened guard windows | A flyout that closes while the pointer is inside the triangle or paused in it, one that never closes after leaving it, or a changed guard-window rule, fails. | `audit:DropdownMenu/behavior` | | ||
| | FR15 | `DropdownMenu.test.tsx` header and footer suite; `__tests__/MenuHeaderFooter.a11y.chromium.spec.ts` in real Chromium | dialog role, modality, name and trigger wiring; regions outside the menu element; typing in a header field; Tab walk header → menu → footer with wrap at both ends; Tab and Shift+Tab from an open sub-menu; hidden and hidden-wrapper controls; Escape from the header; a finger tap on a footer button; bottom sheet order; no regions | A region rendered inside the menu element, a popover with regions that is not a named modal dialog, a trigger still saying `aria-haspopup="menu"` with regions, a header key taken by typeahead, a Tab that leaves the dialog or closes it, focus stranded outside the dialog, or a footer tap swallowed by the press model fails. | | ||
| | FR16 | `DropdownMenuSelectable.test.tsx`, source inspection, scoped `pr-a11y` over the `a11y/Checkbox pattern` stories, and owned Storybook states | checked, unchecked, disabled, caller click/pointer handlers, marker size and ownership | A dropped consumer handler, wrong checked state, nested semantic checkbox, disabled activation, or menu that closes by default fails. | `audit:DropdownMenuCheckboxItem/behavior` | | ||
| | FR21 | `DropdownMenu.test.tsx` touch motion and pan-outside cases; `menuSurfaceMotion.test.ts`; `__tests__/DropdownMenuTouchMotion.interaction.browser.spec.ts` | open, close, an interrupted open and close, Reduce Motion, a mouse; a tap, a hold and a pan outside; focus in the menu at a pan dismissal | A pinned `'popover'` or a mouse open that grows from the trigger, a pan outside that leaves the menu open, or focus left in a hidden menu fails | |
There was a problem hiding this comment.
Optional: this failure expectation fails a grow where it must not happen, but not a missing one. Adding "a finger open in the touch modes that does not grow out of the Trigger, or a close that does not collapse back into it" would match AST-094's FR31-FR33 row ("a surface that does not grow from and shrink into its trigger ... fails") and this record's other rows, which name their primary failure (FR8: "A menu that does not open on a mouse press").
…ndency main's meta#8515 records this pull request's grow as DropdownMenu FR21 and changes the FR8 line around it; the record takes the owner's rows. This pull request's own change to the record stays: FR5 no longer marks FR26 to FR35 as pending, and its status names what is verified (FR26 to FR34, FR35 pending).
Main's meta#8515 added DropdownMenu FR21 (the menu grows out of its trigger under a finger) beside FR20; the requirements table keeps this branch's FR20 wording and FR23 row around it.
Main's meta#8515 took DropdownMenu FR21 (the menu grows out of its trigger under a finger). This branch's header-field hand-off becomes proposed FR22, which no open pull request in the record uses; DEC-14 keeps its number. The Compatibility section keeps main's grow sentence and this branch's breaking note.
Decided (Cindy, 2026-10-26: D23, the DropdownMenu grows from its trigger under a finger; D27, a phone menu stays beside its trigger).
component:DropdownMenuFR21 is marked decided. The record itself staysdraft.spec:AST-094OQ9 is resolved as DEC-19: covering placement is rejected, and the menu keeps the layer runtime's normal placement beside its trigger, inside the gutter.Summary
On a phone, a DropdownMenu today appears with the desktop layer entrance and stays open when the person starts scrolling the page. Proposed
component:DropdownMenuFR21 applies AST-094's touch rules to it:presentationnot pinned to'popover'), the menu grows out of its Trigger button and collapses back into it (spec:AST-094FR31).aria-expandedturns false.presentation="popover", keeps the layer's own entrance.menuSurfaceMotion.test.ts, and a touch-motion browser spec covering open, close, interrupted open and close, Reduce Motion, a mouse, a tap/hold/pan outside, and focus at a pan dismissal.Relation to layer-runtime INV15 (lift module)
FR21's grow doesn't use INV15's opt-in lift-from-trigger module. In #8195 it's a DropdownMenu-owned motion (
menuSurfaceMotion.ts): the popover scales about a computed origin from a 22 × 22 square on the trigger to its size, with a fade, onsprings.menuOpenandsprings.menuClosethrough the shared animator. It isn't the rectangle morph either. It is on by default for DropdownMenu under the touch modes; a pinnedpresentation="popover"or a mouse keeps the layer entrance.That puts it in tension with INV14/INV15, whose source boundary check fails lift or morph code outside the runtime and the lift module. So the owner's decision on FR21 includes which of these applies:
Source
The record text comes from #8195, which implements this behavior; #8195 now carries the code only. The layer exit-copy text it would bring belongs to #8186 and is not repeated here.
Rubric (docs/contributing/spec-writing.md)