Problem/Motivation

Layout builder add section and add block section components fail to meet the WCAG 2.0 AA requirement for color contrast. Having sufficient color contrast is needed to comply with the Drupal core gates.


Proposed resolution

Change either the background color or the text color to comply with WCAG 2.0 AA. However, as we are making changes, we could try to comply with the WCAG 2.0 AAA, even though this is above the goals defined in Drupal core gate.

Remaining tasks

  • Create design with new colors
  • Implement the design change
  • Confirm that the new colors meet at least WCAG 2.0 AA in Bartik and Umami

User interface changes

TBD

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

lauriii created an issue. See original summary.

DyanneNova’s picture

Using the text color #686868 for both links would meet WCAG 2.0 AA and stays generally true to the current design.

lauriii’s picture

What should we do with the icon color? Should we provide a new icon with the color #686868?

DyanneNova’s picture

Yes, we should update the icon to match.

bnjmnm’s picture

Status: Active » Needs review
FileSize
1.45 KB
39.95 KB

Here is the css change + icon
In case it's helpful, the contrast on "Add Block" is now 5.11:1, and the contrast on "Add Section" is 5.20:1 , which meets AA for small text.
This applies to both Bartik and Umami as the those elements have the same colors in both themes.

Screenshot attached of the changes in Chrome.

phenaproxima’s picture

Status: Needs review » Reviewed & tested by the community

Patch looks good and it sounds like the contrast ratio has been verified.

  • xjm committed 85e7c39 on 8.7.x
    Issue #3040241 by bnjmnm, lauriii, DyanneNova: Add section and add block...

  • xjm committed cbef682 on 8.8.x
    Issue #3040241 by bnjmnm, lauriii, DyanneNova: Add section and add block...
xjm’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: +Accessibility

Committed to 8.8.x and cherry-picked to 8.7.x. Thanks!

xjm’s picture

Version: 8.8.x-dev » 8.7.x-dev

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.