Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

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)

Cindy Zhang9b478e53b1fc
diff --git a/docs/specs/AST-094-touch-presentations/spec.md b/docs/specs/AST-094-touch-presentations/spec.md
index 196f7bac06..cce70add68 100644
--- a/docs/specs/AST-094-touch-presentations/spec.md
+++ b/docs/specs/AST-094-touch-presentations/spec.md
@@ -715,6 +715,19 @@ iOS 26.2 simulator measures it.
Rejected: the 150 ms delay on every menu row.
+### DEC-19 — A phone menu stays beside its trigger
+
+**Reference:** `spec:AST-094/DEC-19`
+**Decider:** `cixzhang`, `2026-10-26`
+
+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 wherever the menu fits beside it; a menu taller
+than the room on either side follows the layer runtime's own fallback.
+
+Rejected: covering the trigger, centered on it and aligned with its top or
+bottom, as UIKit's menu does.
+
### DEC-22 — An edge band claims only on an element within the band
**Reference:** `spec:AST-094/DEC-22`
@@ -763,12 +776,6 @@ Rejected: cancelling moves only after the pan begins.
- **OQ8 — Withdrawing a tentative open.** Resolved by
`module:DropdownMenu/useMenuPress` DEC-8: nothing withdraws an open, so a
screen reader hears one open and one close (its AR5).
-- **OQ9 — Where a menu sits on a compact touch screen.** Should an anchored
- menu on a compact touch screen (`spec:AST-012` FR9) cover its trigger,
- centered on it and top-aligned with it, or bottom-aligned with it when the
- trigger's center is below the middle of the viewport, inside a fixed margin
- from the sides, as UIKit's menu does? `component:DropdownMenu` places the
- menu beside its trigger today. (`owner decision`)
- **OQ10 — A sub-menu with its parent visible.** Should a drilled-in sub-menu
open in place, the menu's box growing to it with the parent menu visible
behind it, as UIKit's menu does? This is look and feel; today the sub-menu's
diff --git a/packages/core/src/DropdownMenu/DropdownMenu.spec.md b/packages/core/src/DropdownMenu/DropdownMenu.spec.md
index d1091b9a15..0cb451da96 100644
--- a/packages/core/src/DropdownMenu/DropdownMenu.spec.md
+++ b/packages/core/src/DropdownMenu/DropdownMenu.spec.md
@@ -52,7 +52,7 @@ highlight follows the pointer — is contracted by
- Released default preserved: `no` under a finger. The omitted
`presentation`, released as `'popover'`, follows `spec:AST-094` FR29 (open
- on press) under a finger; `presentation="popover"` keeps the released
+ on press) and this record's FR21 (the grow) under a finger; `presentation="popover"` keeps the released
behavior (`spec:AST-094` FR25). Mouse and keyboard are unchanged.
- Compatibility class: compatible behavior correction; public API, DOM
shape, styling, and targets are preserved; the default under a finger
@@ -127,6 +127,7 @@ keeps its released default.
| 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 a finger, in 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. A mouse keeps the layer's own entrance and exit. | Owner decision, 2026-10-26; `spec:AST-094` FR31, FR32; `family:overlay-dismissal` AV6 | Decided; pending implementation |
### Allowed variation
@@ -338,6 +339,7 @@ than adding a DropdownMenu-owned heading target.
| 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 |
| FR17, AR6 | Shared navigation source and DropdownMenu keyboard tests | disabled checkbox row first, middle, and last | Current tests prove the shared hook skips the row; no keyboard-discoverability proof exists until OQ1 is settled. | `audit:DropdownMenuCheckboxItem/accessibility` |
| FR20, AR7 | `DropdownMenuSubMenu.test.tsx` "header and footer" suite; `ContextMenu.test.tsx` rows-alone case; `__tests__/SubMenuHeaderFooter.a11y.chromium.spec.ts` in real Chromium (fine pointer, coarse pointer) | flyout and phone view; dialog role, name, row wiring; regions outside menus; Tab walk and wrap from a field, row, deeper flyout; field keys, presses; Escape, IME and handled Escapes; keyboard open; pointer leaving, focus in then out; parent closing a nested flyout; view tracking its regions; ContextMenu rows alone | A region inside a menu element, a surface with regions that is not a named modal dialog, a row still saying `aria-haspopup="menu"`, a field key taken by the menu, a Tab that leaves or closes the dialog, a flyout closed under focus by a pointer leaving, a flyout outliving its parent, or the root menu beside a view, fails. | `audit:DropdownMenu/behavior` |