This is split out from the master accessibility thread: Accessibility audit and shepherd for making improvements. Previously directly related issues: Accessibility: Improve contrast of text styling in default UI and Contrast and accessibility and https://meta.discourse.org/t/improving-color-and-contrast-on-topic-progress-widget/27076.
The overall accessibility question here is: do foreground and background text have sufficient contrast? This is of course dependent on theming, but the idea for this issue is that out-of-the-box defaults should be accessible.
The Tanaguru Contrast Finder Tool can help with conversations about contrast and accessibility.
The specific examples that came out of an accessibility audit we did were:
- The text that appears for post excerpts
- The reply field area text
Both have a color combination of #919191/#ffffff, which has a contrast ratio of 3.15, which is not sufficient. At this size, you will need a ratio of at least 4.5. Consider using the following foreground/background combination: #767676/#ffffff / has a ratio of 4.54
In our instance, we just updated the styling for this directly, but it’d be good to update the default so it meets this accessibility threshold as well.
1. The text that appears for post excerpts
Here’s what this change would look like for post excerpts on meta.discourse.org on Desktop (#919191 → #767676):
before:
after:
2. The reply field area text
(edit: oops, this got cut out of my initial post)
Here’s what this part of the UI looks like, with the image from the original report in March 2017:
Looking at this part of the UI now, it appears that this is implemented with a placeholder attribute on <textarea />
and that the current color on Mac Chrome Desktop is #626262 (with great contrast ratio of 6.0)!
At the same time I’m looking at this, I notice that several other bits of text have the same #919191 color though, including “kevinrobinson” at the top, “saved” and “hide preview” on the bottom strip, and the “uploading” message when uploading an image (not shown here):
These appear to be defined with the $primary-medium
variable in SASS. There were some recent changes here in initial pass at color simplification by awesomerobot · Pull Request #4975 · discourse/discourse · GitHub in July 2017 that might be relevant, and we could revisit those colors to audit them across the UI in the default themes exhaustively. The short-term change here could be just to tweak that variable to #626262.