Skip to content

Pr/11902 - #15827

Open
joedolson wants to merge 11 commits into
WordPress:trunkfrom
joedolson:pr/11902
Open

Pr/11902#15827
joedolson wants to merge 11 commits into
WordPress:trunkfrom
joedolson:pr/11902

Conversation

@joedolson

@joedolson joedolson commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

clones and updates 11902

Trac ticket: https://core.trac.wordpress.org/ticket/65280

Use of AI Tools


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

itzmekhokan and others added 10 commits May 21, 2026 00:18
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.
When the responsive menu is opened, focus was moved to the first menu
item (Dashboard). On browsers that match :focus-visible for scripted
focus (e.g. Safari/WebKit on iOS), that first item receives the active
highlight, so two menu items appear active at once.

Move focus to the current top-level item when one exists, falling back
to the first menu link, so the focused item is the one that is meant to
be highlighted.

Follow-up to the :focus-visible changes for #65280.
The admin color schemes (compiled from colors/_admin.scss) styled the
top-level menu highlight on plain :focus, overriding the :focus-visible
rules in admin-menu.css since color scheme CSS loads later. This brought
back the active appearance for pointer/scripted focus on browsers that
match :focus-visible inconsistently.

Switch the color scheme highlight to :focus-visible to match
admin-menu.css, and drop the now-redundant :not(:focus-visible) overrides
that were compensating for the mismatch.

Follow-up to the :focus-visible changes for #65280.
… menu link.

Moving focus to the current menu item when the responsive menu is opened is a
behavior change beyond the scope of this ticket, and is better considered as a
separate enhancement.

See #65280.
@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs.

Core Committers: Use this line as a base for the props when committing in SVN:

Props khokansardar, wildworks, joedolson.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

This would prevent the class from having every pair groups, so it doesn't seem beneficial.
@joedolson

Copy link
Copy Markdown
Contributor Author

@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.

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

@itzmekhokan

Copy link
Copy Markdown

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants