-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Color blindness support #390
Color blindness support #390
Conversation
Wow, this is terrific! I don't see a reason not to merge this sooner rather than later. I could imagine finding a less Watermelon Sugar High palette that still works across the different constraints, but I don't know how to find it off the top of my head, and this is a real need. |
Ditto. This is amazing! |
I think the white-on-pink text for "some tests in this block may not have run" might fall afoul of minimum contrast standards (because the background is too bright) -- worth double checking. Actually, in most of those screenshots, the white text is hard to read, and black would be better. Possibly-useful tip: Firefox's developer tools has an Accessibility tab that will let you simulate these color-deficiencies as well, and also will check for contrast issues. Not sure if the Spectrum extension can do the latter, or if Chrome has contrast-checking tools for you to use... |
Oh nice, I didn't know Firefox had that built-in--thanks! Using the Firefox checker for contrast issues, it didn't seem to flag any violations for the white-on-pink, but I agree it seems to be cutting it close. I changed both themes to use black text there and here's what it looks like under low-contrast simulation: |
One more bit of feedback, from one of our color-vision-impaired teachers:
I clarified further: the exact-nums on lines 8,9 are a bit dark and read mostly as black, as compared to the roughnums on lines 30,31. And the booleans on lines 8,9 are too dark a red and are seen mostly as black. The request is to brighten up the red of the booleans, and to tweak the colors of numbers: exactnums should be blue |
Re: summer update – I think this will actually be nice to release separately. It's also low-risk (whereas the summer update was risky; lots of stuff affected). It's also a nice, separate thing to announce on our road to better accessibility. So I think we can put this out at any time once we're satisfied (and we seem to be a commit or two away from that). |
Sounds good, that makes sense. @blerner Here are booleans adjusted to be brighter: and the number color changes applied to the light theme: Are the number changes intended for the dark theme as well? Applying them yields quite dark exact nums which I find a bit hard to read against the background: I can get something more readable by boosting the lightness on each to about 70%: and it still seems to maintain pretty good contrast. |
If it would help, we could also add some non-color styling to rough-nums, like underline/italics/bold if that would help the distinction be unmissable. |
No, the teacher's comments were specifically about the light theme; the colors you originally had in the dark theme were pretty good. I might separate the hues of the two original dark-theme number colors you'd had, making one of them greener like we just did with the light theme. |
LGTM! |
Can we lift this up to main and get it deployed? |
This begins to address #382 by extending themes to support control over font styling and other non-color aspects of the editor that can be used to create contrast where only color is being used currently. It may also address #326.
There are a few changes:
src/web/css/themes/README.md
for more info), so we can now do things like make all types bold, etc.Here are some screenshots of the new high contrast theme to show what kinds of things can be styled with these changes:
Comparison
The check block colors may seem like a striking difference but they were chosen to increase color contrast for various colorblindness types. See the below comparison (colorblindness simulated with the Spectrum Chrome extension).
Ultimately this is a work in progress and these are just the first ideas I had. I wanted to get feedback given the new changes to themes that allow us to style more aspects of the editor. I think it can be hard to tell what kind of font changes would be helpful vs. distracting.