Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report📚 Storybook Preview🧪 Sandbox PreviewNo new or modified components detected. Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Visual Regression25 of 448 shot(s) changed. A change here is a question, not a failure: check whether the after is the
and 5 more. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
There was a problem hiding this comment.
Thanks for the focused fix — leaving a hosted control's press with the browser is the right shape, and the evidence lines up: the hosted button and checkbox now act while the menu stays open, a hosted field's finger press is no longer cancelled, and controls inside rows still belong to the row.
Approval needs a maintainer/spec owner to update the existing spec first. Current ORD1 in module:DropdownMenu/useMenuPress claims every pointerdown inside a menu, and this change intentionally amends that claim through proposed DEC-9. What must be settled is whether no menu-press root should claim a press beginning on a form control, link, or editable element hosted outside every row, while a control inside a row of any state stays in the press model. Until a maintainer approves that amendment, this cannot be approved as conforming to the current spec; no code change is being requested for that reason alone.
No other concrete defect was found in the reviewed change. Keyboard typing inside a hosted field remains the separate existing gap already called out in this PR.
[Automated review]
|
/approve-spec 505f577 |
…wn press The press model tracked every press inside a menu as a row press: it cancelled a finger's pointerdown and swallowed the click after the release, so a field, button, checkbox or link a menu hosts outside its rows went dead. A press that begins on a form control, a link or an editable element outside every row is now left to the browser; rows, and controls inside rows, keep the model. Amends ORD1 of module:DropdownMenu/useMenuPress (proposed DEC-9), adds a HostedControls story and a Chromium spec.
505f577 to
0a30c86
Compare
|
/approve-spec 0a30c86 |
cixzhang
left a comment
There was a problem hiding this comment.
Owner ruling, cixzhang: a menu holds only menu items, so this exception should not exist.
role="menu" may contain only menuitem, menuitemcheckbox, menuitemradio, groups and separators. The HostedControls story puts a CheckboxInput and a Button directly inside the menu element, so a screen reader is told it is in a menu and then meets controls that are not menu items. Teaching the press model to step aside for them makes that structure work instead of fixing it.
What follows from that:
- A control that is not a menu item belongs outside the
role="menu"element, or the surface is a Popover rather than a menu. Outside the menu element, the press model never claims its presses, so the defect this PR fixes does not arise. - Drop the ORD1 amendment and DEC-9 from
module:DropdownMenu/useMenuPress. ORD1 stays as it is. - If something inside the menu ever genuinely needs its own press, the handling belongs on the menu item, not on an exception list of hosted elements at the menu level.
No code in this PR should land.
|
Thanks for the ruling. I'm following it and closing this PR: ORD1 stays as it is, and a control that is not a menu item goes outside the One place the ruling may reach: #7309 (merged today) is the keyboard counterpart of this exception. A text field or button placed beside a menu's rows keeps its own keys there, through |
User impact
A form a menu hosts beside its rows goes dead. Under a finger a filter field does not focus and a checkbox does not toggle; with a mouse a "Create" button's click never arrives.
Problem and solution fit
handleMenuPointerDowntracks every press whose nearest press root is the menu and cancels a finger'spointerdown. With no row under the release the gesture settles, and the stray-click swallower eats the control's click.A press that begins on a form control, a link or an editable element outside every row is now the browser's. Rows, and controls inside rows, keep the model.
Expected behavior and authority
module:DropdownMenu/useMenuPress(current) ORD1 and ORD2 claim every press inside a menu. This PR amends ORD1 (proposed DEC-9): no root claims a press on a hosted control outside every row. Nothing else in the record changes. Because it amends a current record, it needs a spec owner's approval of this head.Smallest restoration
handleMenuPointerDownreturns before tracking when the target sits in aninput,textarea,select,button,label,a[href],[contenteditable]or[role="textbox"]inside the menu and outside every row (any row role, or the caller's row selector). No API or default change.Evidence
main's hook: clicking the hosted "Create label" button leaves its counter at 0, and a finger tap on the hosted checkbox leaves it unchecked.Writing rubric results
R1 narration: ORD1 and DEC-9 are present tense; "Proposed" marks review state.
R2 research: none.
R3 evidence: the verification row names the tests.
R4 rejected alternatives: DEC-9 rejects a per-control opt-out attribute.
R5 change references: none.
R6 open questions: none.
Scope
Testing