Since the icons aren't just decorative of nature, they need to comply with standard WCAG validation. Doing these reviews so we don't burden the A11y team with having to do this.
Foreground color: #878787
Background color: #d0d0d0
WCAG AA: Fail
WCAG AAA: Fail
I know from dealing with these issues that its relatively hard to pass anything darkgray on lightgray, however it is possible but generally does require giving up on some of the aesthetic "faded" effect.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | aloha-wcag.png | 41.55 KB | webchick |
| #3 | aloha_a11y_contrast.patch | 1.99 KB | quicksketch |
Comments
Comment #1
wim leersPinged Kevin O'Leary to come up with a solution :)
Comment #2
Bojhan commentedShould be relatively easy to solve,
Take the darkest background, and the icon body color. Then use "small text" as WCAG color validator, we aim for atleast WCAG AA and if you can WCAG AAA.
Comment #3
quicksketchHere's a patch which increases the contrast across the board, by lightening backgrounds and darkening fonts. I chose #5a5a5a as the default font color, as that makes Aloha's buttons match the default font color of the Seven theme buttons. More consistency could probably be achieved if appropriate, as AFIAK, Spark's current Aloha design was done fairly independently, and against the Seven theme (which is going to be the admin theme in 90% of cases).
WCAG results according to http://webaim.org/resources/contrastchecker/:
Normal:
Fore: #5a5a5a
Back: #efefef
Normal:
WCAG AA: Pass
WCAG AAA: Fail
Large:
WCAG AA: Pass
WCAG AAA: Pass
Active (during click):
Fore: #222222
Back: #888888
Normal:
WCAG AA: Pass
WCAG AAA: Fail
Large:
WCAG AA: Pass
WCAG AAA: Pass
Active (after click):
Fore: #353535
Back: #ababaa
Normal:
WCAG AA: Pass
WCAG AAA: Fail
Large:
WCAG AA: Pass
WCAG AAA: Pass
This particular tool didn't have a "small" size, but these buttons are at least "normal" and probably considered "large". Additionally for all these results, this is the "worst-case" situation, against the least-contrasting part of the button. In actuality, readability will be slightly increased because the contrast increases in the middle of the gradient.
In any case, according to the tests we've got at *least* AA on all buttons, probably AAA considering the gradient and font size.
Comment #4
quicksketchComment #5
webchickI deployed this to http://spark.webchick.net/8.x for testing. Here is a screenshot showing "at rest," "depressed," and "active" styling:
Looks great to me, but leaving NR to get some other opinions.
Comment #6
Bojhan commentedDid you also change the active background gradient? It seems a little hard now. Let me check with zhe a11y team
Comment #7
tkoleary commentedI know that this represents (a small amount) of scope creep but in an effort to make Accessibility not be an enemy of design I am going to suggest a system-wide toggle that loads a "high contrast" style sheet (hi-con.CSS) for visually impaired users.
It's effects would be something like:
I will write this CSS file myself and pass it to Jesse Beach for code review.
I'm not sure where to present the toggle to the user but it should be prominent, discoverable and available on any admin page. It should also be set and remembered on a per user basis.
Comment #8
tkoleary commentedThis works but really guts many of the subtleties of the design. See my comment on global toggle.
Comment #9
mgifford@tkoleary did you mean to remove "needs accessibility review" or was that just a timing issue?
Comment #10
quicksketchYes, it passes the WCAC now, I would think it's probably more readable than before.
On Mac OS X at least, turning up the contrast to 90% already yields something very close to a high-contrast mode for the buttons. Everything is readable. I don't think there should be a high-contrast mode specifically for Aloha. Leave that to a theme that can provide a specifically good-looking high-contrast appearance across the board.
Comment #11
mgifford@quicksketch - agreed.
I haven't run the color combinations through http://www.dasplankton.de/ContrastA/ but they look good to me.
Comment #12
wim leersThanks a lot for the patch @quicksketch! :) Much appreciated!
@tkoleary: I'd much rather not go the scope creep route, especially if that means introducing the global toggle you're referring to (which suggests that it'll affect more than just Aloha's UI). Why not keep it simple, and ensure the contrast is high enough at all times? Imagine an anonymous user commenting on some site, how could we possibly expect that user to know about our toggle? If the UI does not have sufficient contrast out of the box, (s)he would most likely just forgo leaving a comment at all.
Not yet committing this to hopefully reach some degree of concensus, but let's try to keep it simple :)
Comment #13
Everett Zufelt commentedNot really interested in a switcher into 'accessible' styles, to me that seems like a super slippery slope. Let's just make sure that the site meets WCAG 2.0 for everyone.
Besides, many people that could benefit from appropriately contrasted fore/back colours don't have any idea about high contrast / low contrast, they just know "that thing is hard to see".
Comment #14
wim leersEverett++
Comment #15
tkoleary commented@Bojhan @quicksketch I had a long talk with Wim and Angie about this and the upshot was that even if a global toggle was acceptable under WCAG (questionable) the implementation of it is too much effort right now. So i'm on board with committing this patch.
@quicksketch thanks for doing this.
Comment #16
wim leersGreat, thanks @tkoleary :)
Committed @quicksketch's patch as-is, the only changes being that I lowercased the hex colors he used (as Drupal core does).
- D8: http://drupalcode.org/project/aloha.git/commit/99b4c69
- D7: http://drupalcode.org/project/aloha.git/commit/cbfd382
Comment #17.0
(not verified) commentedUpdated issue summary.