Skip to content

Toolbar: Restore the hover background on top-level items - #15466

Closed
R1shabh-Gupta wants to merge 3 commits into
WordPress:trunkfrom
R1shabh-Gupta:fix/66463-admin-bar-hover-color-schemes
Closed

R1shabh-Gupta wants to merge 3 commits into
WordPress:trunkfrom
R1shabh-Gupta:fix/66463-admin-bar-hover-color-schemes

Conversation

@R1shabh-Gupta

@R1shabh-Gupta R1shabh-Gupta commented Nov 4, 2026 •

Copy link
Copy Markdown

Hovering a top-level Toolbar item shows no visible change in the Blue, Coffee, Ectoplasm, Midnight, Ocean and Sunrise color schemes, because their hover text color is the same as the default text color.

This brings back the hover background, painted on the li instead of the link. The link keeps its rounded focus outline, and the background stays square and lines up with the submenu. The search item keeps its existing no-background hover.

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

Testing

  1. Go to Users → Profile and pick the Blue (or Coffee, Ectoplasm, Midnight, Ocean, Sunrise) color scheme.
  2. Hover "+ New" and other top-level Toolbar items: the background should get darker.
  3. Tab to a Toolbar item: the focus outline shows, with no background change. Press Enter on “+ New”: the submenu opens and the background gets darker.
  4. Repeat with Default, Modern and Light.

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: Code Review


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.

@github-actions

github-actions Bot commented Nov 4, 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.

@R1shabh-Gupta
R1shabh-Gupta marked this pull request as ready for review November 5, 2026 12:17
@github-actions

github-actions Bot commented Nov 5, 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 rishabhwp, 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.

@joedolson

Copy link
Copy Markdown
Contributor

This looks good to me. The core of it is the same as what @jasmussen suggested in #13622 (comment), and the additional coverage cases make sense to me.

It does eliminate the usage of :has for handling background colors on :focus, but I think that's fine - not having background colors on focus was intentional, and isn't necessary.

wporg-sync pushed a commit that referenced this pull request Nov 6, 2026
The Blue, Coffee, Ectoplasm, Midnight, Ocean, and Sunrise color schemes lost their hover states following [65208]. The removal of the background change was fine in schemes where other colors were changed on hover, but not all schemes contain these changes.

Apply color change to the parent `li` on `:hover` so all schemes have a visible `:hover` state in the adminbar.

Developed in #15466.

Props fushar, joen, rishabhwp, joedolson.
Fixes #66463.

git-svn-id: https://develop.svn.wordpress.org/trunk@65324 602fd350-edb4-49c9-b593-d223f7449a82
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

A commit was made that fixes the Trac ticket referenced in the description of this pull request.

SVN changeset: 65324
GitHub commit: 12b8e41

This PR will be closed, but please confirm the accuracy of this and reopen if there is more work to be done.

@github-actions github-actions Bot closed this Nov 6, 2026
wporg-sync pushed a commit to WordPress/WordPress that referenced this pull request Nov 6, 2026
The Blue, Coffee, Ectoplasm, Midnight, Ocean, and Sunrise color schemes lost their hover states following [65208]. The removal of the background change was fine in schemes where other colors were changed on hover, but not all schemes contain these changes.

Apply color change to the parent `li` on `:hover` so all schemes have a visible `:hover` state in the adminbar.

Developed in WordPress/wordpress-develop#15466.

Props fushar, joen, rishabhwp, joedolson.
Fixes #66463.
Built from https://develop.svn.wordpress.org/trunk@65324


git-svn-id: http://core.svn.wordpress.org/trunk@64464 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.

2 participants