Problem/Motivation
In dark mode, the action buttons in the toolbar bar have too low contrast (2.88:1).
The contrast should be at least 3:1.
WCAG SC 1.4.11 Non-text Contrast (Level AA).

Steps to reproduce
- Do a standard installation.
- Set the admin theme to Default Admin.
- Go to
/admin/appearance/settings/default_admin. - Choose Dark for the Appearance setting.
- Click the Save configuration button.
- Go to
/user/1. - Observe the Edit button at the top-right of the page.
Proposed resolution
Use a different color, such as the same color as the standard form submit buttons: --admin-color-primary.
Looks like other toolbar styles for Default Admin are in core/themes/default_admin/css/layout/top-bar.pcss.css
Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | after.png | 72.18 KB | f0ns |
| #9 | before.png | 69.81 KB | f0ns |
| Screenshot 2026-08-19 at 9.25.58 AM.png | 32.97 KB | kentr |
Issue fork drupal-3618127
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
Comment #2
mherchelVerified this is still an issue.
We can override this in Default Admin (like we do with the toolbar), but ideally all of these styles will be moved into the Toolbar module once #3606655: Make dark mode a first class citizen of Drupal core is in
Comment #3
mherchelComment #4
kentr commentedI called it the "toolbar" because that's in the filename / selectors, but the current styling is in the Navigation module (
core/modules/navigation/components/toolbar-button/toolbar-button.css).Comment #7
mherchelFix is ready for review. The fix is somewhat ugly with an ugly selector going into buttons.css. I added at @todo stating that Navigation module will need to handle this eventually.
Comment #8
mgiffordBut isn't this all dependent on the accent colors?
Can't clicking on any of the "accent colors" here /admin/appearance/settings/default_admin immediately give you a different color for all of the buttons (including the submit button on the bottom)
I'd never heard of phantom IDs or scoping attributes. What happens if we change the accent colors?
Comment #9
f0ns commentedJust tested this on a clean Drupal install.
This appears to be an edge case because I also had to set default_admin as the main Drupal theme to let it render the detail page of a user.
Here is the image before the MR:
The MR fixes it as described:
Comment #10
f0ns commentedComment #11
mgiffordThe patch here right now is just adjusting the formatting of the comments. I do think there is a deeper issue going on here #3619933: Drupal Admin Theme Colors
Comment #15
catchWhile this is an edge case, it's going to be the default install of Drupal core for 12.0.0 for new sites, even if we don't expect people to actually use sites like that for longer than it takes to install a front end theme.
Seems OK to go ahead with the workaround here and fix this properly once navigation introduces dark mode support - do we already have an explicit issue for that?
Committed/pushed to main, 11.x and 11.4.x, thanks!