Problem/Motivation
The border of a field type on the "Add field" step has a too low color contrast with 1.3:1 (#dedfe4 against #ffffff - WCAG 2.2 SC1.4.11) .
The border is visual information that is necessary to identify the user interface component the user is able to interact with.
We've discussed the problem in the weekly Drupal CMS a11y track meeting today. For the record the attendees were, @katannshaw, @rkoller, and @the_g_bomb
Steps to reproduce
Proposed resolution
Increase the color contrast of the field type border to at least 3:1
Remaining tasks
User interface changes
Before:

After: (using --color-gray-500 #919297 against the white background #ffffff results in a color contrast of 3.1:1)

Introduced terminology
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | border-color.png | 1.92 MB | neptune-dc |
| #12 | add_field_after.jpg | 121.18 KB | rkoller |
| #11 | image (2).png | 77.82 KB | libbna |
| #10 | image (1).png | 50.28 KB | libbna |
| #8 | 3530855-WebAIM_Contrast_Checker.png | 248.07 KB | the_g_bomb |
Issue fork drupal-3530855
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:
- 3530855-the-border-of
changes, plain diff MR !12420
Comments
Comment #2
rkollerComment #3
libbna commentedComment #5
libbna commentedI've updated the border color from #dedfe4 to #949494. The border is now much more visually distinct.
Comment #6
roshanibhangale commentedHi
I have tested the issue on the Drupal 11.x
After MR3986 is applied successfully, Add fields has the border is now dark and border color is updated to #949494.
Hence this can be move to RTBC +1
Attaching screenshot for reference.
Comment #7
roshanibhangale commentedComment #8
the_g_bomb commentedConfirmed, patch applies and improves the border contrast.
I have also checked the new contrast with a contrast Checker.
Comment #9
rkollerthanks for the MR! i agree #949494 has a high enough contrast, but problem is that this color is not one of the available color variations for claro. the list of available variables is:
Comment #10
libbna commentedI checked using the contrast checker, and
--color-gray-500: #919297;meets the expected contrast ratio.Comment #11
libbna commentedForgot to attached the screenshot of the final output.
Comment #12
rkollerthank you! I've updated the issue summary to reflect the ui changes. and as said in the issue summary the contrast of 3.1:1 is meeting the requirement. so looks all good now.
Comment #13
neptune-dc commentedI have confirmed that the new border color is being applied at `admin/structure/types/manage/article/fields` > Create a New Field. +1 RTBC
Comment #16
longwaveThis is eligible for backport as an accessibility bug fix, but does not apply cleanly to 10.6.x. If anyone wants to backport this down to 10.x please open a backport MR; otherwise we will just fix this in 11.x and move on.
Committed and pushed e7013351307 to 11.x and dadcf295d0c to 11.2.x. Thanks!
For changes like this, screenshots are only helpful if they show both before and after, so I have not credited anyone that only uploaded "after" screenshots.