Problem/Motivation
The non-hyperlink pager items in the Seven theme do not meet WCAG AA section 1.4.3 requirements for text contrast.
These are the ellipses seen when there are more than 9 pages worth. All other items in the pager are links.
To reproduce,
1. Login to drupal 8
2. Navigate to /admin/content
3. Make sure you have ~500 content items so you see the ellipsis
3. Run DAP Chrome plugin, WAVE, or other WCAG conformance checker on page
4. See a message similar to the following.
"Minimum contrast of 3.36 with its background is not sufficient to meet WCAG AA requirements for text of size 13.0486px and weight of 700."
See attached screenshots (pager ellipsis>, pager items) for details.
Proposed resolution
Review current colors and backgrounds for pager items that are not hyperlinks and determine a suitable change that is in line with the Seven theme styles that also passes WCAG 2.0 "SC 1.4.3 Contrast (minimum)" at level AA.
Before
Before screenshot from #20:
After
After screenshot from #20:
Remaining tasks
User interface changes
Update Seven pager item styles to increase contrast for the ellipsis item, to satisfy WCAG.
Minimal effect on visual aesthetics of the existing design.
API changes
None
Data model changes
None
Comment | File | Size | Author |
---|---|---|---|
#23 | 2930354-23-before-wave-tool.png | 472.29 KB | jds1 |
#23 | 2930354-23-before-pager-only.png | 17.44 KB | jds1 |
#23 | 2930354-23-after-wave-tool.png | 488.83 KB | jds1 |
#23 | 2930354-23-after-pager-only.png | 15.53 KB | jds1 |
#20 | interdiff_16-20.txt | 490 bytes | ddavidd |
Comments
Comment #2
sdewitt CreditAttribution: sdewitt commentedComment #3
sdewitt CreditAttribution: sdewitt commentedUpdated summary.
Comment #4
sdewitt CreditAttribution: sdewitt commentedComment #5
sdewitt CreditAttribution: sdewitt commentedComment #6
sdewitt CreditAttribution: sdewitt commentedChanged version to 8.5.x-dev
Comment #7
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer and at Annertech commentedThanks for the colour contrast reports @sdweitt
Comment #8
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer and at Annertech commentedComment #10
Wim LeersComment #11
shubham_narlawar CreditAttribution: shubham_narlawar at Google Summer of Code commentedComment #12
rickmanelius CreditAttribution: rickmanelius at DDEV commentedThis has a tag of novice and the extra detail for the specific areas to address is helpful. While I believe this would be a few CSS changes to address, the bigger question I have is if there is someone or a group that needs to be involved from a branding/design perspective to approve. Or if it's simply a matter of increasing the contrast until the threshold is crossed before that warrants a conversation.
If no response, suggestion on moving forward is to just get the patch to review and then it will be quicker to turn around feedback if/when the appropriate stakeholders can provide feedback.
Comment #13
ddavidd CreditAttribution: ddavidd commentedI created a patch based on the previous comment for community review.
Comment #14
mradcliffeThank you for the patch.
Can't we just use `.pager__item--ellipsis` instead of the increased specificity?
Comment #15
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer and at Annertech commentedThanks for working on this @rickmanelius and @ddavidd.
Go for it! Then we'll see how it looks. Before and after screeshots will help. So long as it doesn't disrupt the design too much we'll be fine I think.
Comment #16
ddavidd CreditAttribution: ddavidd commentedThanks mradcliffe, I added the interdiff.
Comment #17
rickmanelius CreditAttribution: rickmanelius at DDEV commentedMy Test
I believe this along with the previous review by @mradcliffe in #14 and the follow-up modification by @ddavidd in #16 would justify making this RBTC. Looking forward to your thoughts, @andrewmacpherson!
Comment #18
mradcliffeRemoved Needs screenshots tag. Added screenshots to summary.
Comment #19
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer and at Annertech commentedGood work so far. Thanks for the screenshots.
Review of patch from #16:
1.
This fixes the contrast problem for the pager ellipsis, so it passes WCAG 2.0 SC 1.4.3 Contrast (Minimum) at level AA, comfortably over the line. I think the impact on the visual aesthetics is minimal. Good!
Before: contrast ratio 3.36:1
After: contrast ratio 4.6:1
2.
I don't think we need to add a whole new ruleset block just for the ellipsis. Instead, we can just update the color for
.pager__item
. It just happens that the ellipsis is the only kind of.pager__item
that doesn't contain a link.Re: #17,
Some of these are from the primary tabs, which are already being addressed by #2930508: Seven inactive tabs do not meet WCAG AA 1.4.3 for contrast.
The others are invisible text in the toolbar, I think. This might warrant a separate issue, but is out of scope here.
Comment #20
ddavidd CreditAttribution: ddavidd commentedI just removed the ruleset I created and instead updated the
.pager__item
as suggested in #19. This should do the trick. I updated to 'needs review.'Comment #21
mradcliffeThis needs a re-review and maybe an update on screenshots.
Comment #22
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer and at Annertech commentedPatch #20 is good IMO.
Screenshot evidence will be good. Keep in mind this is a really subtle colour change which will be hard to see. So, some before AND after screenshots will demonstrate that the change isn't disruptive to the established design. The actual contrast assessment has been done already in #19.
Comment #23
jds1Looks great to me. Here are screenshots showing before/after of WAVE tool output + pager only.
Comment #24
jds1Comment #25
benjifisher@if-jds Thanks for adding the new screenshots!
The issue summary is still using the older screenshots, based on the patch from #16. I am adding the "Needs issue summary update" tag because we should update the IS with the new screenshots.
Comment #26
jerseycheeseWent ahead and added those new screenshots to the IS, based on #20. Hope I'm doing this right (first-time sprinter here)!
Comment #27
lauriiiCommitted a1cbb16 and pushed to 8.6.x. Thanks for everyone who worked on this!