Problem/Motivation
The WebAIM contrast checker says the sidebar close button contrast is 1.95:1. The button is #55565B and the background is #2A2A2D.
I think it should be at least 3:1 per WCAG SC 1.4.11 Non-text Contrast (Level AA)
Not sure why Axe and Accessibility Insights aren't picking this up. Possibly because it's an inline SVG.
I didn't check against Gin.
Steps to reproduce
- Log in as admin.
- Go to
/admin/appearance.
- Set Default Admin as the admin theme.
- If it's not already appearing in dark mode, go to
/admin/appearance/settings/default_admin, change "Appearance" to "Dark", and submit the form.
- Narrow the viewport until Navigation sidebar collapses and the "Expand sidebar" button is visible (<
1024px wide).
- Click the the "Expand sidebar" button.
Expected
The sidebar close button has sufficient contrast.
Actual
It has low contrast.

Proposed resolution
Make it the same color as the menu buttons in the sidebar (var(--toolbar-button-color)?) or the theme's other close buttons for consistency.
Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
Comments
Comment #2
kentr commentedComment #3
kentr commentedComment #4
kentr commentedComment #5
rupeshghar commentedThe close button's icon (cross.svg) had its color hardcoded to #55565B instead of using currentColor like all the other sidebar icons do. Because it was hardcoded, it never changed with dark mode. Changed the icon to use currentColor instead of the hardcoded color, so it now matches the other buttons in the sidebar and adjusts properly for dark mode.Please review attached patch
AI-Generated: Yes (Used Claude to help generate the patch and reviewed/tested the output before submitting).
I had not read the policy and had reviewed the output but missed out on disclosure - will ensure to share this info from next time.
Comment #6
kentr commented@rupeshghar thanks for your contribution.
Patches aren't used anymore. It needs to be in a merge request.
Comment #8
rupeshghar commented@kentr I have updated the previous comment and mention the usage of the AI but also have done the human review. the disclosure was missing which I will take care from next time.
I've also created an MR for this. Thanks
Comment #9
smustgrave commentedTested with a color contrast tool
And passes, LGTM.
Comment #10
amateescu commentedPosted a question on the MR, feel free to self-rtbc once it's addressed or answered.
Comment #11
smustgrave commentedMade the change and verified in darkmode that the mobile hamburger works still.
Comment #14
amateescu commentedCommitted and pushed 263b7b802ce to main and 2f4325e8e02 to 11.x. Thanks!
Comment #16
smustgrave commentedThanks!