Opened 6 months ago
Closed 8 days ago
#65280 closed defect (bug) (fixed)
Mobile devices bug Report – Multiple Admin Menus Showing as Active
| Reported by: | sumitsingh | Owned by: | joedolson |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.2 |
| Component: | Administration | Version: | |
| Severity: | normal | Keywords: | has-screenshots has-patch has-unit-tests needs-testing has-test-info commit |
| Cc: | Focuses: | ui, administration |
Description
In WordPress 7.0, multiple admin sidebar menus appear active/highlighted at the same time.
## Issue
When navigating to a specific admin menu item, another unrelated menu still appears active with background highlighting.
### Example
- Open the Comments menu
- The Posts menu still appears active/highlighted in the sidebar
This creates UI confusion because multiple menus look selected simultaneously.
## Expected Result
Only the currently active admin menu should:
- display active state
- show highlighted background
- appear selected
## Actual Result
Two or more menus appear active at the same time.
## Environment
- WordPress Version: 7.0
- Admin Area
- Reproducible on multiple pages
## Steps to Reproduce
- Login to WordPress admin
- Navigate to Comments menu
- Observe Posts menu still highlighted/active
- Repeat with other admin menus if applicable
## Impact
- Confusing admin navigation
- Incorrect active menu indication
- Minor UI/UX inconsistency
Attachments (11)
Change History (49)
This ticket was mentioned in Slack in #core by sumitsingh. View the logs.
6 months ago
This ticket was mentioned in PR #11902 on WordPress/wordpress-develop by @khokansardar.
6 months ago
#3
- Keywords has-patch has-unit-tests added
Use :focus-visible for admin menu focus indicators so touch taps do not leave a stale active appearance on previously selected items. Clear the responsive selected state when another top-level menu is opened or when navigating via a submenu link. Limit admin menu view transitions to the current menu item to avoid overlapping active styles during navigation.
Fixes #65280.
#4
@
6 months ago
- Component Menus → Administration
- Focuses accessibility removed
- Milestone Awaiting Review → 7.0.1
Confirmed using ios safari. Moving to 7.0.1 for consideration.
Removing the accessibility focus as this is a universal bug.
#5
@
6 months ago
@sumitsingh thanks for the details, I am also able to replicate this one on playground.
Environment
WordPress: 7.0
PHP: 8.1.23
Server: nginx/1.16.0
Database: mysqli (Server: 8.0.16 / Client: mysqlnd 8.1.23)
Browser: Chrome 126.0.0.0 (macOS)
Theme: Twenty TwentyVersion: 2.7
#6
@
5 months ago
- Owner set to
- Status new → accepted
This seems like a good scenario for using :focus-visible, as showing the focus state as active is quite confusing.
Also confirmed on Android/Chrome.
This ticket was mentioned in Slack in #core by cbravobernal. View the logs.
5 months ago
@masteradhoc commented on PR #11902:
5 months ago
#8
@khokansardar commented on PR #11902:
5 months ago
#10
@itzmekhokan thank you very much for the PR! I wasnt able to replicate the issue on desktop but on mobile (iOS, edge browser) with wordpress playground though.
when i tested it the dashboard menu item showed up marked active. can you recheck?
Thanks @masteradhoc for the careful retest, and @neo2k23 for cross-checking on iPad/iPhone — the conflicting results (reproducible on iOS Edge, not on your installs) were the key clue. Pushed a fix in 792cbd4 and c62309b.
#11
@
5 months ago
Thanks @masteradhoc for the retest and @neo2k23 for cross-checking on iPad/iPhone — the conflicting results were the clue. Addressed in the PR (792cbd4, c62309b).
Root cause: When the responsive menu opens, focus was moved to the first menu item (Dashboard). The active highlight for a focused top-level item is applied by the color scheme via plain :focus (colors/_admin.scss), which loads after admin-menu.css and overrides its :focus-visible rules. The :not(:focus-visible) guard only suppressed that highlight on browsers that treat the scripted menu-open focus as not focus-visible (Chrome, most installs — hence not reproducible for @neo2k23). On iOS Edge/WebKit that scripted focus is treated as :focus-visible, so the guard was skipped and Dashboard appeared active.
Fix (two parts):
common.js— on menu open, move focus to the current menu item (fallback: first link) instead of always the first. This resolves the issue independently of the:focus-visibleheuristic.colors/_admin.scss— switch the color-scheme menu highlight from:focusto:focus-visibleto matchadmin-menu.css, and drop the now-redundant:not(:focus-visible)overrides.
Validated under keyboard modality (where :focus-visible matches — the worst case, mirroring iOS): focus lands on the current item, Dashboard stays transparent, only the current item is highlighted. The original "two top-level menus active at once" case is also still cleared.
Re-test on iOS Edge / Playground welcome.
#12
@
5 months ago
- Milestone 7.0.1 → 7.0.2
As the RC for WP 7.0.1 is expected to land tomorrow we'll have to punt this to 7.0.2.
#14
@
4 months ago
Test Report
Patch tested: https://github.com/WordPress/wordpress-develop/pull/11902
Environment
- WordPress: 7.1-alpha-20260630.112841
- Subdirectory: No
- PHP: 7.4.33
- Server: PHP.wasm
- Database: WP_SQLite_Driver (Server: 8.0.38 / Client: 3.51.0)
- Browser: Chrome 150.0.0.0
- OS: Windows 10/11
- Theme: Twenty Twenty-Five 1.5
- MU Plugins: None activated
- Plugins:
- Test Reports 1.3.0
Steps taken
- From the dashboard, click the hamburger menu.
- Then select the comments menu item.
- Click the hamburger menu again and observe the highlighted menu item/s.
- Repeat this process with other menu items.
- Observe the results before and after applying the patch.
- ✅ Patch is solving the problem
Expected result
- Only the selected menu item should be highlighted as active.
Additional Notes
- None
Screenshots/Screencast with results
- Screencast before:
https://drive.google.com/file/d/1WE9WVNlTwJr52Egr7G1GMxKyxBV3d72C/view?usp=sharing
- Screencast after:
https://drive.google.com/file/d/1nVm7bki8PAyVq8-L1uZnrSezto1MTMhS/view?usp=sharing
#15
@
4 months ago
Test Report
Patch tested: https://github.com/WordPress/wordpress-develop/pull/11902
Environment
- WordPress: 7.1-beta3
- Subdirectory: No
- PHP: 8.5.1
- Server: nginx/1.26.1
- Database: mysqli (Server: 10.6.23-MariaDB / Client: mysqlnd 8.5.1)
- Browser: Chrome 150.0.0.0
- OS: macOS 26.5.2
- Theme: Twenty Twenty-Five 1.4
- MU Plugins: None activated
- Plugins:
- Core Rollback 1.4.2
- Test Reports 1.3.0
Steps taken
1. Logged into the WordPress admin dashboard on version 7.0.
- Navigated to the Comments menu section and observed the admin sidebar menu states.
- Verified the original bug where multiple sidebar menu items (e.g., both Comments and Posts) appeared active and highlighted simultaneously.
- Applied patch and reloaded the admin page.
- Confirmed that only the currently selected/active admin menu item retains the highlighted background and active state.
- ✅ Patch is solving the problem
Expected result
- Only the currently active admin menu item should display the active state and highlighted background, preventing multiple sidebar items from looking selected simultaneously.
Additional Notes
- Successfully tested and verified on macOS, resolving the admin sidebar highlighting UI bug.
Screenshots/Screencast with results
- Yes
Support Content
- N/A
#16
@
4 months ago
Test Report
Patch tested: https://github.com/WordPress/wordpress-develop/pull/11902
✅ Verified that the patch has resolved the multiple menu highlight on Mobile device.
#17
@
4 months ago
- Milestone 7.0.3 → 7.1
Moving to 7.1, as there is unlikely to be a general bug fix of 7.0 at this point.
This ticket was mentioned in Slack in #core-test by noruzzaman. View the logs.
4 months ago
@
3 months ago
Confirmed the issue could be reproduced before applying the patch. After applying the latest patch, the issue was resolved as expected.
#19
@
3 months ago
Test Report
Environment:
WordPress: 7.1 Beta 4
PHP: 8.3.
OS: Windows 11
Browser: Google Chrome
Theme: Twenty Twenty-Five
Plugins: None
Result:
I successfully reproduced the reported issue in the mobile admin menu before applying the latest patch from PR #11902. After applying the patch, I repeated the same testing steps and confirmed that the issue was resolved. I also verified the mobile admin menu behavior, including menu expand/collapse, submenu navigation, and the active menu state, and did not observe any regressions.
Screenshots: Attached (before and after applying the patch). 
#20
follow-up:
↓ 21
@
3 months ago
- Keywords 2nd-opinion added
- Milestone 7.1 → 7.2
I'm going to push this to WordPress 7.2, because I think that the scope of behavior change is too great to commit without some further discussion.
The current PR changes the behavior of admin submenus on mobile devices from allowing users to open multiple menus to only allowing a single menu to be open. While this may be an improvement, I think it needs discussion.
#21
in reply to: ↑ 20
@
5 weeks ago
- Keywords 2nd-opinion removed
Replying to joedolson:
I'm going to push this to WordPress 7.2, because I think that the scope of behavior change is too great to commit without some further discussion.
The current PR changes the behavior of admin submenus on mobile devices from allowing users to open multiple menus to only allowing a single menu to be open. While this may be an improvement, I think it needs discussion.
I think this is both an improvement and desirable, doing testing an an iPhone I am finding I have less need to scroll as I navigate between menu sections.
I've compared the browserlist config in WordPress with MDN's focus-visible docs and supported browser all look to support the feature.
#23
@
4 weeks ago
Reproduction Report
This report validates that the issue can be reproduced.
Environment
- WordPress: 7.0 (WordPress Playground)
- Browser: [e.g. Chrome 1xx on Windows 11]
- Device / viewport: [e.g. Chrome DevTools device emulation, iPhone 12 Pro / desktop 1440px]
- Theme: [Twenty Twenty-Five (default)]
- Plugins: None
- Admin color scheme: [Default]
Steps taken
- Opened a fresh WordPress 7.0 site in Playground and logged in to wp-admin.
- Clicked/tapped Posts, then Comments in the admin sidebar.
- Observed the sidebar after the Comments screen loaded.
- Repeated with other menus: [Media, Dashboard, ...].
Expected result
Only the current menu item shows the active/highlighted state.
Actual result
✅ Issue reproduced. After opening Comments, the Posts menu still appears highlighted/active, so two menus look selected at the same time. [Add: happens on touch/mobile emulation only / on desktop as well / on other menus too.]
#24
@
3 weeks ago
Test Report
Patch tested: https://github.com/WordPress/wordpress-develop/pull/11902
Environment
- WordPress: 7.2-beta1-64606-src
- Subdirectory: No
- PHP: 8.2.29
- Server: nginx/1.29.4
- Database: mysqli (Server: 8.4.8 / Client: mysqlnd 8.2.29)
- Browser: Firefox 158.0
- OS: Ubuntu
- Theme: Twenty Twenty-Five 1.5
- Plugins:
- Test Reports 1.3.0
Steps taken
- Set Firefox responsive mode to 414×846, Android user agent (SM-G892A), DPR 3.5, no throttling.
- Log in and open Dashboard at http://localhost:8889/wp-admin/.
- Open the admin menu with the hamburger control. Only Dashboard is highlighted, and its submenu (Home, Updates) is open.
- Tap Posts. Do not follow a submenu link. Stay on Dashboard.
- Repeat on the Playground build of this pull request: open Dashboard, open the menu, tap Media.
❌ Patch is failing
Expected result
- On a phone-width admin screen, tapping a top-level menu item should not leave a second item looking active.
- Dashboard may stay marked as the current screen. The tapped item (Posts, Media, and so on) should not also get the solid blue active background.
- A touch tap should not leave a stale selected or focus style on that item.
Additional Notes
- Local result: after tapping Posts, Dashboard stays blue and Posts is also solid blue. The Dashboard submenu stays open. The main content is still the Dashboard.
- Playground result for core-pr=11902: after tapping Media, Dashboard stays blue and Media is also solid blue. Same failure as the local checkout.
- Tested commit ff944c9b3c on branch pr-11902 ("Merge remote-tracking branch 'upstream/trunk' into pr/11902"). That commit's src/wp-includes/version.php is 7.1-beta4-62899-src. The environment block above is the Test Reports output from this site, which reports 7.2-beta1-64606-src.
Screenshots
Support Content
- Pull request: https://github.com/WordPress/wordpress-develop/pull/11902
- Trac ticket: https://core.trac.wordpress.org/ticket/65280
- Playground: https://playground.wordpress.net/?core-pr=11902
This ticket was mentioned in PR #15125 on WordPress/wordpress-develop by gdbaroraofficial.
3 weeks ago
#25
I changed the selector, since on mobile it was automatically focusing on top link(Dashboard). But I am not sure if focus on a:first was intended for some other purpose.
Opened from the WordPress Contributor Toolkit.
@gdbarora commented on PR #15125:
3 weeks ago
#26
I mistyped something, will fix and push again.
This ticket was mentioned in PR #15131 on WordPress/wordpress-develop by @gdbarora.
3 weeks ago
#27
Focus on current menu instead of first link.
Opened from the WordPress Contributor Toolkit.
#28
in reply to: ↑ description
;
follow-up:
↓ 29
@
9 days ago
Hi Everyone!
My name is Miriam, and I'm currently a student participating in the WordPress credits program.
I have successfully reproduced the bug on trunk
Test Environment / Reproduction Report:
I followed the reproduction steps using mobile device simulation in the browser.
Environment:
- WordPress: Trunk
- Browser: Google Chrome Google Chrome 156.0.8078.80
- Operating System: Windows 10
- PHP Version: 8.3.35
- Theme: Default theme
Results:
Bug reproduced successfully on trunk. Multiple admin menus are showing as active at the same time in mobile view.
#29
in reply to: ↑ 28
@
9 days ago
- Keywords has-test-info added
Replying to mimitrz:
I've been testing this patch, and here is my patch test report:
Environment Setup:
- WordPress: Trunk
- Browser: Google Chrome 156.0.8078.80
- Operating System: Windows 10
- PHP Version: 8.3.35
- Server / DB: Local Docker environment
Testing Process & Results:
I applied the proposed patch for src/js/_enqueues/admin/common.js and src/wp-admin/css/admin-menu.css in my local environment. After testing the admin dashboard using mobile simulation view, I can confirm that the issue is resolved. Multiple admin menu items no longer show as active simultaneously when navigating.
Conclusion:
The patch works as expected and resolves the issue.
https://imgur.com/a/WJL30in
#30
@
9 days ago
Test Report
Patch tested: https://github.com/WordPress/wordpress-develop/pull/15131
Environment
- WordPress: 7.2-beta4
- Subdirectory: No
- PHP: 8.4.27
- Server: PHP/8.4.27 (Development Server)
- Database: WP_MySQL_On_SQLite (Server: 8.0.38-mysql-on-sqlite-3.1.2 / Client: 3.53.4)
- Browser: Chrome 156.0.0.0
- OS: Windows 10/11
- Theme: Ipsum 1.0
- MU Plugins:
- 99-studio-loader.php
- Plugins:
- Test Reports 1.3.1
Note: Tested on WordPress Studio (SQLite setup), using Chrome DevTools device emulation (Pixel 10, touch).
I did not apply the pull request as a whole.
I manually applied the one-line change it makes in wp-admin/js/common.js.
Steps taken
- Open the Pages list in wp-admin (
edit.php?post_type=page) - With DevTools device emulation (Pixel 10, touch), set the viewport width to 375px
- Tap the hamburger button at the top left to open the menu. Take a screenshot
- Manually apply the change from PR 15131: in
common.js, change$( '#adminmenu a:first' ).trigger( 'focus' );to$( '#adminmenu a.current' ).trigger( 'focus' );(the original line was commented out with//). No other files were changed. Hard-reload the page (Ctrl+F5) - Tap the hamburger button at the top left to open the menu. Take a screenshot
Results
The values below, such as document.activeElement, were read in the DevTools console right after the menu opened.
| Dashboard | Pages (current screen) | |
| Before | highlighted (focused) | highlighted |
| After | not highlighted | highlighted |
- Before the patch, opening the menu highlighted both Dashboard and Pages (reproduced).
document.activeElementwas Dashboard, which matched:focusbut not:focus-visible. - After the patch, only Pages was highlighted when the menu opened.
document.activeElementmoved to the current item (the "All Pages" link under Pages). - ✅ The patch fixes the issue for this scenario (opening the menu on the Pages list).
Screenshots
Before — Dashboard and Pages highlighted

After — only Pages highlighted

Notes
- I only tested Chrome device emulation (Pixel 10) at a single width (375px), on the Pages list. I did not test on a real iOS Safari device.
- I did not test actions after the menu is open (tapping another item, opening a submenu, and so on). This PR only changes where focus moves when the menu opens.
- I did not test the other changes in PR 11902 (how the selected state is handled when other items are tapped).
---
AI assistance: Yes
Tool(s): Claude Code
Used for: I did the testing together with Claude Code, which suggested the steps and wrote the console script. I carried out every step and checked the results myself. Claude Code translated this report into English, and I reviewed its contents.
#31
@
8 days ago
Thanks for the 2nd opinion, @peterwilsoncc! Tests seem to confirm that this is working, so I think I feel comfortable moving forward.
This ticket was mentioned in PR #15827 on WordPress/wordpress-develop by @joedolson.
8 days ago
#32
@joedolson commented on PR #11902:
8 days ago
#33
This now has a messy history, thanks to a botched merge with conflicts (my fault), but the cloned version has a clean history, and I'm going to commit that one. The difference is in view-transitions.css, where this PR is badly messed up.
I'm unsure why I was unable to push to this PR again to fix it; I was unable to load the PR, for some reason.
@joedolson commented on PR #11902:
8 days ago
#34
Closing in favor of 15827.
@joedolson commented on PR #15827:
8 days ago
#35
@itzmekhokan I removed the subclass change in view transitions; I don't think that matches the intent of the class, and I can't honestly see any real difference in outcome. If you have a good reason for this, let me know how to reproduce it.
@khokansardar commented on PR #15827:
8 days ago
#36
@joedolson Thanks, agreed. #adminmenu > .menu-top.wp-has-current-submenu only matches elements that #adminmenu > .menu-top already matches, with the same declarations, so it had no effect. There's nothing to reproduce.
One leftover: the assertion I added at line 45 of tests/phpunit/tests/view-transitions/wpEnqueueViewTransitionsAdminCss.php still checks for .menu-top.wp-has-current-submenu, so test_inline_css_included now fails on all PHPUnit jobs. Could you remove that line too? I can't push to your fork.



You can see screenshot