Problem/Motivation
When using online accessibility tool, it states that the grey text from the Claro theme fails AA and AAA accessibility check due to low contrast: the color is #828388
, which gets a 3.78:1 ratio and is still not enough for normal text.
Steps to reproduce
Navigate to /admin/config and inspect .admin-item__description
.
Proposed resolution
We should change it to #55565B
(--color-gray-800
), which is the same color used for the rest of the description texts (lighter UI text).
Remaining tasks
Create the patch.
User interface changes
The color for the description in admin lists will be slightly darker.
Before:
After:
Comment | File | Size | Author |
---|---|---|---|
#29 | Screen Shot 2022-02-22 at 10.39.44.png | 12.15 KB | lauriii |
#29 | Screen Shot 2022-02-22 at 10.39.35.png | 11.65 KB | lauriii |
#29 | 3123811-27-d10.patch | 1.01 KB | lauriii |
| |||
#27 | 3123811-27.patch | 1009 bytes | kostyashupenko |
#16 | accessibility-contrast.png | 250.59 KB | hansa11 |
Comments
Comment #2
lauriiiThank you for filing an issue for this! I'm moving this to the Drupal Core issue queue because Claro has been moved there.
Comment #3
mgifford#ddd on #fff is a problem for sure.
Comment #4
mgiffordComment #5
codewithlakshay CreditAttribution: codewithlakshay at OpenSense Labs for DrupalFit commentedChanging
--color-oldsilver: #82828c; to --color-davysgrey: #545560;
Fixes the issue, attaching Screenshot as well as the patch.Comment #6
codewithlakshay CreditAttribution: codewithlakshay at OpenSense Labs for DrupalFit commentedComment #8
priyanka.sahni CreditAttribution: priyanka.sahni at Srijan | A Material+ Company for Drupal India Association commentedComment #9
priyanka.sahni CreditAttribution: priyanka.sahni at Srijan | A Material+ Company for Drupal India Association commentedVerified and tested by applying the patch#5.There are still some contrast error related to the grey text.
Steps to test-
1. Go to the admin site.
2. Go to /admin/structure.
3. Enable the wave evaluation tool.
4. Verify the accessibility report.
Accessibility Report -
Accessibility Report Contrast Errors -
Comment #10
priyanka.sahni CreditAttribution: priyanka.sahni at Srijan | A Material+ Company for Drupal India Association commentedComment #11
DeepaliJ CreditAttribution: DeepaliJ at QED42 for Drupal India Association commentedAs per the #9, changing the status
Comment #12
sd9121 CreditAttribution: sd9121 as a volunteer and commentedComment #13
sd9121 CreditAttribution: sd9121 as a volunteer and commentedPlease review the patch.
Screenshot for the reference:
Comment #14
hansa11 CreditAttribution: hansa11 as a volunteer and at QED42 commentedComment #15
sd9121 CreditAttribution: sd9121 as a volunteer and commentedThe patch in #13 comment id failed, this one would work. Please review.
Thanks!
Comment #16
hansa11 CreditAttribution: hansa11 as a volunteer and at QED42 commentedThank you @sd9121 for your contribution, this looks good to me.
Screenshot for the reference:
Comment #17
hansa11 CreditAttribution: hansa11 as a volunteer and at QED42 commentedComment #18
xjmThanks for your work on this accessibility issue!
Since the color choice affects the design, I think we should have subsystem and/or frontend framework manager signoff on the new, accessible color choice, so tagging accordingly. I think it's probably great but just want to confirm with the maintainers. :)
Thanks!
Comment #19
lauriiiCan we check that this matches with the new palette of grays described in #3154539: Implement new Gray scale on Claro?
Comment #20
saschaeggiWe're introducing an updated grey scale in #3154539: Implement new Gray scale on Claro and therefore this issue needs to wait until the other issue is implemented.
The new color which should be used for the description text is: Moiety
Updated component in Figma: https://www.figma.com/file/OqWgzAluHtsOd5uwm1lubFeH/Drupal-Design-system...
Comment #21
bnjmnmPer #20, Postponed on #3154539: Implement new Gray scale on Claro
Comment #24
ckrinaMoving this to active because #3154539: Implement new Gray scale on Claro has been already fixed.
Next steps are defining which of the new colors should be used that comply accessibility guidelines.
Comment #26
ckrinaThis issue was filled for the
.admin-item__description
, where the color used at that time didn't comply (it seems it was#ddd
. Nowadays, the color is#828388
, which gets a 3.78:1 ratio and is still not enough for normal text.We need to change it to
#55565B
(--color-gray-800
) and use the same color used for descriptions.Comment #27
kostyashupenkoComment #28
rkollerI've applied the patch. With
#55565B
for.admin-item__description
the color contrast is now at7.3:1
which passes WCAG 2.11.4.3 Contrast (Minimum - AA)
for regular and large text,1.4.6 Contrast (Enhanced - AAA)
for regular and large text and1.4.11 Non-text Contrast (AA)
for UI components and graphical objects. Checked with Colour Contrast Analyser (CCA) and inside the Chrome Devtools.Comment #29
lauriiiAttaching Drupal 10 patch and uploaded before and after screenshots to the issue summary.
Comment #33
lauriiiCommitted ce3899e and pushed to 10.0.x. Committed patch from #27 to 9.4.x and cherry-picked to 9.3.x because this is a bug fix for Claro which is experimental. Thanks!