The Vertical orientation button on the right side of the admin menu at large screen sizes (or at the bottom of the admin menu when the menu is already vertically oriented)

screenshot of color contrast test with #bebebe and #f5f5f5

has insufficient color contrast when it is not hovered or not focused. The SVG icon's color is set to #bebebe while the background-color is #f5f5f5

screenshot of the vertical orientation button in the vertical admin menu

When it IS hovered, the SVG icon's color is set to #787878 with the same background color #f5f5f5, which is better, and matches the other icons in the menu

screenshot of the vertical orientation button in the horizontal admin menu

I believe it is this way because this is the only icon in the menu without associated text ... So, the icons that DO have associated text don't have a color change on hover because instead the associated text gets underlined. This one, without associated text, needs a color change on hover to indicate focus/active.

The question is, if the SVG icon color starts at the darker #787878, then what does it transition to on hover/active/focus, as there isn't really an analogous situation as far as I can tell. This is also slightly complicated by the fact that the background color for this one section of the menu is #f5f5f5 rather than #ffffff in the rest of the admin menu, which makes it harder to achieve "good" color contrast with the same icon colors.

Again, the icons are SVGs with a fill attribute specified on their path elements, so that's likely where it should be changed:

core/misc/icons/787878/push-left.svg
core/misc/icons/bebebe/push-left.svg

which are then referenced in:

core/modules/toolbar/css/toolbar.icons.theme.css
core/themes/stable/css/toolbar/toolbar.icons.theme.css

Comments

bhogue created an issue. See original summary.

bhogue’s picture

bhogue’s picture

Issue summary: View changes
bhogue’s picture

Issue summary: View changes
bhogue’s picture

Issue summary: View changes
bhogue’s picture

Issue summary: View changes
bhogue’s picture

Issue summary: View changes
bhogue’s picture

Issue summary: View changes
bhogue’s picture

Issue summary: View changes
mgifford’s picture

Issue tags: +wcag21

This is a WCAG 2.1 issue. Good to fix, but just noting that.

bhogue’s picture

Good call, thank you mgifford

andrewmacpherson’s picture

The relevant WCAG 2.1 criterion is "1.4.11 Non-text contrast".

It needs 3:1 contrast with the background.

What are the contrasts for the colours currently used?

Adding this to a parent issue.

dafink’s picture

Could we make this so that the default color is #787878 and have the hover b3 #666666? Or does this have to match a style guide?

lanny heidbreder’s picture

Patch attached. I chose two colors that already had icon folders: #787878 and #505050. Exactly 3:1 ratio would be #8e8e8e, and these are darker.

The #bebebe version of this icon is orphaned now, I believe; there aren't any other uses of it in Drupal Core that I'm aware of. I'm not sure whether it's a good idea to just delete a tiny asset that developers might have used who-knows-how. I can reroll with the deletions committed if others think that's best.

andrewmacpherson’s picture

Issue tags: +Needs screenshots

Can we see screenshots please?

lanny heidbreder’s picture

StatusFileSize
new430 bytes

Here's a comparison of the unhovered state. Top is before, bottom is after. The new hover state is darker than the new unhovered state.

lanny heidbreder’s picture

Status: Needs work » Needs review
Issue tags: -Needs screenshots

Version: 8.6.14 » 8.6.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.

Version: 8.6.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Branches prior to 8.8.x are not supported, and Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

gaurav-mathur’s picture

Assigned: Unassigned » gaurav-mathur
gaurav-mathur’s picture

Assigned: gaurav-mathur » Unassigned
StatusFileSize
new4.12 KB
new4.33 KB

Patch #14 applied successfully on on Drupal 9.4.8.The looks good for me.
Refer to screenshots.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

gauravvvv’s picture

Component: toolbar.module » Claro theme
StatusFileSize
new8.24 KB

This icon comes from Claro theme. I feel so this issue is of Claro.
I have attached a path for same. Please review.

rinku jacob 13’s picture

StatusFileSize
new14.64 KB
new8.79 KB

I have reviewed patch #26 for drupal version 10.1.x. Actually this icon is in both olivero and claro theme(i didn't checked in other themes).But for only claro it is happening.Adding Screenshots for the reference

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Needs Review Queue Initiative
StatusFileSize
new160.78 KB

Tested it passes using https://www.tpgi.com/color-contrast-checker/

With the fix it is passing.

contrast

lauriii’s picture

Component: Claro theme » toolbar.module
Status: Reviewed & tested by the community » Needs work

While Claro is shipping some Toolbar CSS, the current Toolbar designs are not specific to Claro. I think this should be also fixed within the Toolbar module.

Version: 9.5.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.

quietone’s picture

Status: Needs work » Postponed

The Toolbar Module was approved for removal in #3476882: [Policy] Move Toolbar module to contrib.

This is Postponed. The status is set according to two policies. The Remove a core extension and move it to a contributed project and the Extensions approved for removal policies.

The deprecation work is in #3484850: [meta] Tasks to deprecate Toolbar module and the removal work in #3488828: [meta] Tasks to remove Toolbar module.

Toolbar will be moved to a contributed project before Drupal 12.0.0 is released.

quietone’s picture

Project: Drupal core » Toolbar
Version: main » 1.x-dev
Component: toolbar.module » Code
Status: Postponed » Needs work

Toolbar module has moved to contrib.

quietone’s picture