Problem/Motivation

The "eye" icon (via navigation.icons.yml) SVG appears to be using a hard coded color (#55565B) instead of currentColor. Looks like the same issue as #3621244: Navigation mobile sidebar close button in dark mode has low color contrast but with a different icon.

Steps to reproduce

Proposed resolution

Remaining tasks

Screenshots
Review

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3623811

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

amerie created an issue. See original summary.

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

abenbow’s picture

Status: Active » Needs review

I've opened up a new MR that resolves this request by making the fill color for the eye.svg file be "currentColor" instead of the hardcoded hex value.

It now inherits whatever the text color is for the given element.

To the issue opener's point, I do think there are a few other icons like this one in the stack that could stand a little SVG fixup in order to get the same effect.

abenbow’s picture

I've added a link to a new issue I've opened that tries to reconcile the final hardcoded colors:

https://www.drupal.org/project/drupal/issues/3624877

quietone’s picture

Version: 11.4.x-dev » main
Issue summary: View changes
Issue tags: +Needs screenshots

Hi, Issues for Drupal core should be targeted to the 'main' branch, our primary development branch. Changes are made on the main branch first, and are then back ported as needed according to the Core change policies. The version the problem was discovered on should be stated in the issue summary Problem/Motivation section. Thanks.

The MR here is on main so no need for a change there.

I am restoring standard issue template so we can track progress on this issue.

Changes to the user interface should have before and after screenshots, so tagging for that. The icon is not used in core but would be best to proof there are no typos or small errors introduced.

abenbow’s picture

StatusFileSize
new6.82 KB
new6.6 KB
new7.9 KB
new8.26 KB
new8.02 KB
new9.67 KB

@quietone, thanks for the heads up about the screenshots, and for providing some further context around this issue.

Above, I've uploaded some screenshots I've put together demonstrating the differences that this commit introduces.

Namely, you'll notice that the light mode screenshots are virtually unaffected (I assume the original icon color was only tested in light mode), but the dark mode screenshots are where you can see a real difference.

I couldn't find any part of the navigation module that directly implements this eye icon, so my implementation for testing is custom. However, I'd assume that this is immediately noticeable for users who try to extend the navigation module for their own ends, which isn't entirely unimaginable given that the assets and the API are there and encourage that kind of work.

ironnuts’s picture

I have reviewed this issue. The code swaps a hardcoded hex value for the path fill attribute of the eye.svg with a CSS variable. No problem identified with the code at all.

There is an obvious improvement in the contrast and clarity of the icon in eye-after-unselected.svg.png compared to eye-before-unselected.svg.png.

There seems no difference between eye-before-light.svg.png and eye-after-light.svg.png.

However there is a clear improvement in contrast and clarity between eye-before.png (bad) and eye-after.png (good).

Checking back my instinctive reactions with the IS, this seems to be exactly what we need to resolve this issue. Moving to RTBTC and removing the tag Needs screenshots because it does not need any.

ironnuts’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs screenshots