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:

Shows ellipses with WAVE report documenting contrast error

After

After screenshot from #20:

Shows WAVE sidebar with less contrast errors on the page and ellipsis is visible

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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sdewitt created an issue. See original summary.

sdewitt’s picture

Updated summary.

sdewitt’s picture

Title: Seven page items do not meet WCAG AA 1.4.3 for contrast » Seven pager items do not meet WCAG AA 1.4.3 for contrast
sdewitt’s picture

Issue summary: View changes
sdewitt’s picture

Version: 8.4.x-dev » 8.5.x-dev

Changed version to 8.5.x-dev

andrewmacpherson’s picture

Issue tags: -pager +Accessibility

Thanks for the colour contrast reports @sdweitt

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Wim Leers’s picture

Issue tags: +Novice
shubham_narlawar’s picture

Issue tags: +DAP Chrome Plugin
rickmanelius’s picture

This 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.

ddavidd’s picture

Issue summary: View changes
Status: Active » Needs review
Issue tags: +midcamp2018
FileSize
434 bytes

I created a patch based on the previous comment for community review.

mradcliffe’s picture

Status: Needs review » Needs work
+.pager__item.pager__item--ellipsis {

Thank you for the patch.

Can't we just use `.pager__item--ellipsis` instead of the increased specificity?

andrewmacpherson’s picture

Issue tags: +Needs screenshots

Thanks for working on this @rickmanelius and @ddavidd.

Or if it's simply a matter of increasing the contrast until the threshold is crossed before that warrants a conversation.

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.

ddavidd’s picture

Status: Needs work » Needs review
FileSize
356 bytes
422 bytes

Thanks mradcliffe, I added the interdiff.

rickmanelius’s picture

FileSize
61.1 KB
447.34 KB

My Test

  • Setup: I provisioned a fresh drupal 8 site, enabled devel generate to make 500+ nodes, and then downloaded the WAVE Chrome plugin.
  • Before: WAVE noted 6 contrast errors and caught the issue with the ellipses in the pager (see attachment).
  • After: WAVE noted 5 contrast errors and no longer specifies the ellipses as an issue (see attachment).

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!

mradcliffe’s picture

Issue summary: View changes
Issue tags: -Needs screenshots

Removed Needs screenshots tag. Added screenshots to summary.

andrewmacpherson’s picture

Issue summary: View changes
Status: Needs review » Needs work
Issue tags: -DAP Chrome Plugin

Good 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.

+.pager__item--ellipsis {
+  color: #757575;
+}

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,

After: WAVE noted 5 contrast errors and no longer specifies the ellipses as an issue

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.

ddavidd’s picture

Status: Needs work » Needs review
FileSize
393 bytes
490 bytes

I 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.'

mradcliffe’s picture

Issue tags: +Nashville2018

This needs a re-review and maybe an update on screenshots.

andrewmacpherson’s picture

Patch #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.

jds1’s picture

Looks great to me. Here are screenshots showing before/after of WAVE tool output + pager only.

jds1’s picture

Status: Needs review » Reviewed & tested by the community
benjifisher’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs issue summary update

@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.

jerseycheese’s picture

Issue summary: View changes
Status: Needs work » Reviewed & tested by the community
Issue tags: -Needs issue summary update

Went ahead and added those new screenshots to the IS, based on #20. Hope I'm doing this right (first-time sprinter here)!

lauriii’s picture

Status: Reviewed & tested by the community » Fixed

Committed a1cbb16 and pushed to 8.6.x. Thanks for everyone who worked on this!

  • lauriii committed a1cbb16 on 8.6.x
    Issue #2930534 by ddavidd, if-jds, sdewitt, rickmanelius,...

Status: Fixed » Closed (fixed)

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