Description
So I am struggling with this for a long time due to some changes in JupyterLab (and elsewhere) and now on this website too.
TLDR: The tools that measure color contrast are wrong (for a certain definition of wrong). Please do user testing; please use APCA from upcoming WCAG 3. Do not listen to contrast checkers blindly.
The old way of displaying white text on blue or orange seems to be working better for me, even though it technically fails in contrast checker audits. There are many articles written on it, but I would like to highlight The Myths of Color Contrast Accessibility (Myth 1: The WCAG requirements are always optimal) and especially relevant due to our brand colour Orange You Accessible? A Mini Case Study on Color Ratio:
There may not be consensus on this one, and I may be in minority of users with mild colour blindness which find the black on orange and black on blue annoying, but I just wanted to share it. I really think that the designers who worked on Jupyter colour palette did a great job and I don't feel we need to force-change the colours based solely on the tools which calculate contrast.
I do feel that using more subtle changes like adjusting text-shadow
(and not just with black/white colour, but to carefully selected shade of the relevant colour), which is in WCAG guidelines but unfortunately is not properly accounted for by Lighthouse and friends, is much better way. I do hope that this will change, Lighthouse is investigating using Advanced Perceptual Contrast Algorithm (APCA) which is now available in developer version of DevTools over old AA/AAA guidelines but it is not clear if it will solve all the issues.
APCA will be included in WCAG 3 according to this tweet by Dan Hollick and beautifully it highlights that the "white on orange" is fine (even though it was failing in the old simple algorithm):
The tweet highlights the that the orange button issue is really a failure of WCAG 2 and links to Why the New Contrast Method APCA a document from WCAG 3 contrast author who clearly highlights the issues with WCAG 2 colour recommendations calling it:
the single "most wrong" part of WCAG 2.x
which really well expresses my feeling about it
CC @isabela-pf