Closed (fixed)
Project:
Drupal core
Version:
main
Component:
Admin theme
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Feb 2025 at 03:43 UTC
Updated:
1 Oct 2026 at 20:55 UTC
Jump to comment: Most recent, Most recent file


Comments
Comment #2
rkollerComment #3
mgiffordOk, lets minimize the SVG and have it use the ButtonFace so it is more easily customizable
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="ButtonFace" d="M14.6 3 13 1.4a1 1 0 0 0-1.4 0l-1.3 1.4 3 3 1.2-1.3a1 1 0 0 0 0-1.4M5.2 13.6l-3-3 7-7 3 3zm-4.3 1c0 .3 0 .5.3.4l2-.7-1.6-1.6z"/></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path stroke="ButtonFace" stroke-width="3" d="m2.3 2.3 11.4 11.4m-11.4 0L13.7 2.3"/></svg>I think there will be better ways to do this, but just looking at the issue of the forced colors mode
There is some JS which is is hiding edit pen when the mouse isn't hovering over the form:
<form class="views-exposed-form" aria-label="Filter the contents of the Media view" data-drupal-selector="views-exposed-form-media-library-page" action="/admin/content/media-grid" method="get" id="views-exposed-form-media-library-page" accept-charset="UTF-8" data-once="exposed-form">It converts this:
to this:
<button class="trigger focusable" type="button" aria-pressed="false">Open configuration options</button>But it doesn't trigger for keyboard users (focus).
It should always be visible, especially in a high contrast mode.
Comment #4
mgiffordThis CSS is an issue in both Gin & Claro, so this isn't a Gin specific issue. The CSS works reasonably well in both.
Comment #5
mgiffordThis occurs in the media system, but not sure it is restricted to it.
Comment #6
quietone commentedIn Drupal core changes are made on on 11.x (our main development branch) first, and are then back ported as needed according to the Core change policies. Thanks
Comment #8
kentr commentedIf I understand correctly, I'm inclined to say that this is a Gin / Default Admin issue.
The icon originates from the contextual module, but AFAICT it's (currently) overridden by Default Admin in
contextual_links.css.I think it's likely that the theme's dark mode will need an override by itself even if the light mode version is unified somehow.
Postponing based on #3582351: [Meta] Clean up CSS within Admin theme until the CSS restructure / refactor is done.
Comment #9
mgiffordI thought about moving this back to the Gin theme and then copying it so that it is also part of Core (and linking them), but just making it more visible for the Admin theme queue.
Leaving it in #3506302: [Meta] Improve the accessibility of the Gin theme
I also wonder if deleting CSS might be acceptable in the CSS cleanup.
Comment #10
kentr commentedComment #11
mherchelThis is ready to be worked on
Comment #12
mgiffordComment #14
mgiffordPatch added (produced with AI).
Some updated screenshots with the patch applied.
Comment #15
mgiffordComment #16
alex ua commentedI tested the MR on chromium (in light, dark, and forced colors) using the Default Admin theme at /admin/content/media-grid, and it works as described.
I did note a few small things you might want to look at before a commit:
FWIW I also didn't test in any other browser besides Chrome.
Generated with the help of an LLM, but written (mostly) by me.
Comment #17
kentr commentedComment #19
smustgrave commentedPushed a fix to use a svg file to address the first bullet.
As as the 2nd bullet not sure which is correct 2px or 4px
For the 3rd bullet wonder if it was because they were capitalized? Pushed a change up for that.
Comment #20
smustgrave commentedAdd context to the button label for screenreader users
Seems like this step is still missing.
Comment #21
mherchelThe button context issue is real, but this functionality doesn't belong in the theme. It belongs in the contextual module, so it can apply to all themes.
I opened up a followup #3623711: Labels for contextual links are redundant and missing a context to get that fixed.
Comment #22
mherchelComment #23
smustgrave commentedbelieve tested right, used a high contrast chrome plugin with black on yellow setting. Everything appears and focus is is easy to see.
Comment #24
mgiffordI've attached 3 screenshots from Tugboat. The contrast seems a lot better https://contrast.report/
Nice to see this improve.
Comment #25
mherchelThis looks great to me! There's a couple unrelated bugs that I found while testing this:
Comment #27
mherchelCommitted and pushed 09fef26db8c to main. Thanks!
Comment #28
mherchelOpened followup #3624123: UX issues with contextual links in Admin theme
Comment #31
mherchelI want to make sure tests pass before backporting.
Comment #33
mherchel