The focus outline is using a different shade of green than the rest of Claro

Created on 9 January 2025, 7 days ago

Problem/Motivation

I've raised the issue a few weeks/months back that the focus outline in the navigation sidebar is not meeting the minimum contrast requirement of 3:1 necessary for SC1.4.11... back then we havent created an issue because there shouldnt be an issue that isnt directly actionable lingering in the issue queue. but i've realized today that the focus color in the navigation module is using a different color than the focus color used in Claro in general:

Navigation: #00CC6D (--admin-toolbar-color-focus -> --drupal-admin-color-green-300) against #fff => 2.:1
Claro: #26a769 (--color-focus -> --color-lightninggreen) against #fff => 3:1

Steps to reproduce

  • go to for example admin/modules and check the color contrast for the top level menu item people in the sidebar and the filter field

Proposed resolution

There are two options how to solve this:

  1. Use --color-lightninggreen (#26a769) on the navigation sidebar as well. That way the color would be consistent across the navigation and the rest of claro.
  2. Use --drupal-admin-color-green-400 (#009952) instead of --drupal-admin-color-green-300 for the navigation sidebar and the focus for the rest of claro.

It looks like option 2 would be the preferable choice. Found the different shades of green in variables.css in the navigation module. going with --drupal-admin-color-green-400 for the navigation and claro in general, aside the overall consistency, it would also have another positive side effect, the focus would have enough color contrast against the background color of the header as well:

#009952 against #fff (general background) 3.7:1
#009952 against #F3F4F9 (header) 3.4:1

for Claro #26a769 had even a too low color contrast against the background of the header even with 2.8:1. so if --drupal-admin-color-green-400 would be an acceptable choice and wouldnt collide with anything else option 2 using that would be the preferable choice for the navigation module as well as claro in general.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Active

Version

11.0 🔥

Component

navigation.module

Created by

🇩🇪Germany rkoller Nürnberg, Germany

Live updates comments and jobs are added and updated live.
  • Accessibility

    It affects the ability of people with disabilities or special needs (such as blindness or color-blindness) to use Drupal.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024