Repository navigation
Conversation
🤖 PR meta 🤖🎉 PropsIf you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Updated as activity occurs, without notifying anyone named here. Add the 📦 Bundle sizeSize Change: +287 B (0%) Total Size: 9.07 MB 📦 View Changed
⚡ PerformanceShow the resultsClient side metrics exclude the server response time. front-end-block-theme
front-end-classic-theme
media-processing
media-upload
post-editor
site-editor
🏁 Flaky testsSome tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information. Custom Completer: should allow newlines after multiple option completions in
|
Split from #84583. This PR targets
trunkindependently.What?
Focus the DropdownMenu container when opening with a pointer. Keyboard and virtual activation keep first-item focus, and arrow keys can enter a pointer-opened menu.
Why?
Pointer opening should not highlight the first item before the pointer reaches an item.
How?
Choose the default Popover focus mode from the opening event and move pointer focus to the semantic menu. Reset that choice on close. Explicit
focusOnMountvalues and consumer focus handlers retain precedence. Container entry is limited to menu arrow keys, preserving native Tab and Shift+Tab navigation.The two existing editor E2E flows now enter the pointer-opened menu with ArrowDown before checking first-item focus. No test files or test bodies were added.
Testing Instructions
popoverProps.focusOnMountsettings and consumer focus handlers. A later controlled opening should use the default first-item focus.Testing Instructions for Keyboard
TabbableContainer cycle={false}. Shift+Tab should leave it; Tab should enter its first tab stop.Verification and limits
Existing dropdown, Popover, and navigation tests passed, along with typecheck, lint, and the production build. CLI browser checks cover pointer and keyboard opening, arrow entry, focus return, explicit focus settings, custom focus targets, controlled reopening, and Tab navigation. A synthetic empty-pointer-type click with nonzero detail checks virtual activation handling; actual screen readers and real touch hardware remain untested.
The two edited editor E2E flows could not run locally because Docker exhausted its default address pools while creating the test environment. Their pointer-opened menus now explicitly receive ArrowDown before first-item assertions, including the locked-block case. CI still needs to verify the final E2E update.
Screenshots or screencast
Standalone DropdownMenu Default, basic global CSS, 520 × 330.
Use of AI Tools
Implemented, reviewed, and verified with Codex. I reviewed the changes and remain responsible for them.