Open dav-idc opened 1 year ago
Some quick tests with the above tool on some common components and patterns.
Notably, the tool seems to make the distinction on whether the colour is used in the foreground or background, which the current WCAG criterion doesn't do.
Example | Text color | Background colour | PCA | PCA (WCAG compatible) | WCAG |
---|---|---|---|---|---|
Body text | #0b0c0c |
#ffffff |
105.8 | 15.8 | 19.6 |
Body links | #1d70b8 |
#ffffff |
75.1 | 4.6 | 5.2 |
Header | #ffffff |
#0b0c0c |
-105.0 | 15.3 | 19.6 |
Footer — Seconday buttons — Tabs | #0b0c0c |
#f3f2f1 |
98.1 | 11.6 | 17.5 |
DS site main navigation | #1d70b8 |
#f8f8f8 |
71.0 | ⚠️ 4.2 | 4.9 |
DS site masthead — Notification banner | #ffffff |
#1d70b8 |
-77.8 | 5.1 | 5.2 |
Link focus style — Skip link | #0b0c0c |
#ffdd00 |
86.6 | 7.5 | 14.5 |
Default buttons — Panel — Successful notification banner | #ffffff |
#005a30 |
-90.3 | 8.2 | 8.4 |
Warning buttons | #ffffff |
#d4351c |
-74.9 | 4.6 | 4.9 |
Error messages | #d4351c |
#ffffff |
72.1 | ⚠️ 4.2 | 4.9 |
Initial thoughts takeaways:
@querkmachine thanks for taking a peek! I've started a spreadsheet to compile all the values, if working from there is comfortable for you. I've set it to be publicly commentable. https://docs.google.com/spreadsheets/d/17-LEU0x5UyZbXJ66d0dR6-SQXTuPosFlLN8-3qygw-E/edit?usp=sharing
I'm also noting that your colour combos in that table above are definitely more real-world applicable than my method of testing everything with white and black. I think your method of curating text and background colours makes sense to me, especially for the 'main' colours.
For the colour palette (like the pink, orange and teal), perhaps that's where the contrasts with black or white come in handy.
Copied across and fleshed it out with more tests. 👍
Hi @querkmachine and @davidc-gds
I happened upon your thread here, and as I'm the creator of APCA and BPCA I wanted to chime in and provide some additional information if you'd like. Some of this is from a FAQ I'm working on.
...Pretty much universally the perceived contrast under PCA is less than the current WCAG calculation, drastically so in the case of link focus and the footer....
The calculated contrast is lower, this means the actual perceived contrast will be higher. Here are three related FAQ QAs if you want a deeper dive:
.
.
.
.
...Colours considered acceptable in one configuration are not in another (e.g. warning button vs. error message)...
.
The following is also covered more in FAQ #1 & #2 above.
...The possible threshold generally seems to be lower. Pure black on pure white in WCAG is the highest possible contrast ratio of 21:1, in WCAG compatible PCA the same combination is 16:1....
Please let me know if you have any questions, either direct, here in this thread, or in the APCA forum.
ALSO: You may be interested in the APCA Readability Criterion, while a work in progress, the main text guidelines and the Bronze Simple Mode are fairly complete and have been testing across many sites with good results. And the APCA-RC shows the general direction, and hints for the future.
Thank you for reading.
What
We have a set of 'colour' styles within our design system, which were tested for colour contrast agains the WCAG 2.x colour contrast method.
Our two sets of colour styles are:
Consider testing these colours against the APCA method. APCA is being explored as a potential successor contrast method for WCAG 3, but the testing tools are available now.
What it would involve
Using the Bridge-PCA testing tool, test our colour contrasts against both the WCAG 2.x method and APCA.
Documentation
Why
The APCA method is evidenced to do a more consistent job at matching real-world contrast needs. There's still no settled consensus on APCA's advantages and disadvantages as a tool for measuring contrast, but I figure it's probably a good enhancement to our colours.
Measuring against both methods will:
Who needs to work on this
Developers, interaction designers, accessibility specialist
Who needs to review this
Done when