Repository navigation
DropdownMenu: Match initial focus to the opening interaction (7.2 backport) - #85826
Conversation
Co-authored-by: ciampo <mciampini@git.wordpress.org> Co-authored-by: mirka <0mirka00@git.wordpress.org> Co-authored-by: stokesman <presstoke@git.wordpress.org> Co-authored-by: jameskoster <jameskoster@git.wordpress.org> Co-authored-by: Mamaduka <mamaduka@git.wordpress.org> (cherry picked from commit c4085c3)
🤖 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: +267 B (0%) Total Size: 9.04 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. Backspace in
|
Backports #85486 to
wp/7.2.What?
Match DropdownMenu's initial focus to the opening interaction. Pointer opening focuses the menu container; keyboard opening focuses its first item.
Why?
The automatic backport failed on a conflict in the components changelog.
How?
Cherry-pick
c4085c3e8d84414e0e94797c5dcafb716469776b, resolving the changelog conflict by adding only the DropdownMenu entry. The implementation, documentation, browser tests, and editor E2E changes are identical to #85486.Testing Instructions
popoverProps.focusOnMountsettings and consumer focus handlers retain precedence.Testing Instructions for Keyboard
TabbableContainer cycle={false}root. Shift+Tab should leave it; Tab should enter its first tab stop.Editor E2E verification is blocked because Docker has exhausted its default address pools. CI still needs to verify those flows.
Local verification
The production build, components typecheck, lint, and 128 focused unit/browser tests passed. The pointer-focus regression test fails on the original
wp/7.2implementation and passes with this backport.Screenshots or screencast
See the pointer and keyboard comparison in #85486.
Use of AI Tools
Codex applied the backport, resolved the changelog conflict, ran local verification, and drafted this description.