Increase the color contrast of the iconography on the status report page

Created on 13 February 2025, 5 months ago

Problem/Motivation

The yellow icon has a too low color contrast against the white background in light mode (See the table in https://docs.google.com/spreadsheets/d/1won35PxhRFexJYE8FmZ4DCNTo7xEAxC8... or iconography.xlsx.zip β†’ for more details).

Discussed and iterated on the issue with @mgifford, @the_g_bomb, @katannshaw, and @drupa11y

Steps to reproduce

  • Go to admin/reports/status

Proposed resolution

  • Increase the color contrast to at least 3:1 for the color yellow against the background layer used in warning messages in light mode so it meets SC1.4.11.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

4.0

Component

User interface

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

Merge Requests

Comments & Activities

  • Issue created by @rkoller
  • πŸ‡¨πŸ‡¦Canada mgifford Ottawa, Ontario

    Yellow is just such a difficult color for contrast. Orange is easier.

  • πŸ‡¨πŸ‡¦Canada mgifford Ottawa, Ontario

    The current color can be described by:

    hsl(46, 67%, 52%)
    rgb(216, 178, 52)
    #D8B234

    I'm no color expert but changing it to this

    hsl(41, 95%, 31%)
    rgb(157, 110, 4)
    #9D6E04

    Would meet color contrast accordign to Tanaguru.com's Contrast Finder.

  • Pipeline finished with Failed
    8 days ago
    Total: 225s
    #542214
  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

    Tests are failing because the change was made in the dist/css directory, which contains files that get generated by a preprocessor. Changes need to be made in the styles directory and then npm build needs to be called which updates the distribution files.

    Also, color codes are using lower case characters.

  • Pipeline finished with Running
    8 days ago
    #542371
  • Pipeline finished with Canceled
    8 days ago
    #542365
  • πŸ‡¨πŸ‡¦Canada mgifford Ottawa, Ontario

    Ok.. I don't know what to do from here though https://git.drupalcode.org/project/gin/-/merge_requests/635/diffs

  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

    What's required is to run npm build locally in your dev environment. That will compile the changes into the distribution files and the result should then also be committed to the MR.

  • πŸ‡¨πŸ‡¦Canada mgifford Ottawa, Ontario

    Sadly, I need more information. This is a 3 line change (one little search/replace). npm build locally doesn't work for me Unknown command: "build".

    It is a pretty trivial patch, but I still don't know how to contribute it.

    diff --git a/styles/theme/variables.scss b/styles/theme/variables.scss
    index 8e37e68b..ede2f940 100644
    --- a/styles/theme/variables.scss
    +++ b/styles/theme/variables.scss
    @@ -12,7 +12,7 @@
       --gin-color-disabled-bg: #eaeaea;
       --gin-color-disabled-border: #c2c2c2;
     
    -  --gin-color-warning: #d8b234;
    +  --gin-color-warning: #9d6e04;
       --gin-color-warning-light: #efcf64;
       --gin-bg-warning: #{mix(black, #efcf64, 70%)};
       --gin-bg-warning-light: rgba(226, 151, 0, .08);
    @@ -35,7 +35,7 @@
       --gin-status-bg: #eee;
       --gin-status-success-text: #1d6844;
       --gin-status-success-bg: #26a76930;
    -  --gin-status-warning-text: #{mix(black, #d8b234, 40%)};
    +  --gin-status-warning-text: #{mix(black, #9d6e04, 40%)};
       --gin-status-warning-bg: rgba(226, 151, 0, .15);
       --gin-status-danger-text: #cc3d3d;
       --gin-status-danger-bg: rgba(222, 117, 96, .15);
    @@ -292,7 +292,7 @@
       --gin-status-bg: rgba(255, 255, 255, 0.12);
       --gin-status-success-text: #8bd3b1;
       --gin-status-success-bg: #26a76940;
    -  --gin-status-warning-text: #{mix(white, #d8b234, 40%)};
    +  --gin-status-warning-text: #{mix(white, #9d6e04, 40%)};
       --gin-status-warning-bg: rgba(226, 151, 0, .15);
       --gin-status-danger-text: #{mix(white, #cc3d3d, 50%)};
       --gin-status-danger-bg: rgba(222, 117, 96, .15);
  • First commit to issue fork.
  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

    This is looking good now, setting to "Needs review" so that people can test and review this.

    @mgifford just FYI, the npm build command needs to be run in the Gin directory. But @siddharthjain has now done it for us, thank you.

  • πŸ‡¨πŸ‡¦Canada mgifford Ottawa, Ontario

    Thanks @siddharthjain_7998 & @jurgenhaas

    I'll try to figure this out in the future.

Production build 0.71.5 2024