Problem/Motivation

In Drupal 12, the highlight color for search has changed from dark-blue to light purple, so there's too little contrast.

Drupal 11
Drupal 11 dark blue

Drupal 12
Drupal 12 light purple

Steps to reproduce

Search for something with Admin Toolbar Search in Drupal 12, hover over an item, and see the highlight color is light purple.

Proposed resolution

Make the highlight color in Admin Toolbar Search in Drupal 12 dark blue, as in Drupal 11. (or dark grey?)

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
D12-search-light-purple.png242.06 KBressa
D11-search-blue.png227.26 KBressa
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

ressa created an issue. See original summary.

ishfaqafridi85 made their first commit to this issue’s fork.

ishfaqafridi85’s picture

Status: Active » Needs review

Opened MR !231. The cause is that Drupal 12's default admin theme highlights the active autocomplete item with a light tint (--admin-color-bg-item-hover) while Admin Toolbar Search forces white link text on it.

AI disclosure: Claude Code (Anthropic) assisted with the code and the local test setup; I reviewed and tested the change locally.

ressa’s picture

Status: Needs review » Reviewed & tested by the community

Thank you for a fast MR @ishfaqafridi85, it works perfectly, and the background is again dark blue, with plenty of contrast.

dydave’s picture

We need this!

I noticed this as well, while testing admin_toolbar_search 👍

The MR is super clean and I like the way its value was abstracted with a CSS variable.

We should be able to get this merged and included in the next release 3.7.0. 👌

dydave’s picture

Status: Reviewed & tested by the community » Fixed

Merged, thanks everyone! 🥳

The active (hovered or keyboard selected) Admin Toolbar Search suggestion now has an explicit dark blue background (--admin-toolbar-search-item-active-background, #003ecc), set in the module's CSS, so the white link text no longer depends on the admin theme's autocomplete colors. This fixes the low contrast on the light purple highlight of the Drupal 12 default admin theme. Drupal 10 and 11 look the same as before, since the color is Claro's blue, and white text on it has a contrast ratio of about 8.2:1.

Tested with the default admin theme and with Gin. ✅

Thanks to @ishfaqafridi85 for the clean MR, to @ressa for reporting and testing it, and to everyone who reviewed.

The fix will be included in the next release.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

ressa’s picture

Fantastic! Thank you @ishfaqafridi85 and @dydave for fixing and committing this bug fix so fast.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.