# Accesibilidad: Contraste de color

**URL:** <https://meta.discourse.org/t/accessibility-color-contrast/77856>\
**Category:** Feature\
**Tags:** accessibility\
**Created:** [12 Enero, 2018 16:42 UTC](https://meta.discourse.org/t/accessibility-color-contrast/77856 "2018-01-12T16:42:20Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![kevinrobinson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kevinrobinson/32/120056_2.png) [@kevinrobinson](https://meta.discourse.org/u/kevinrobinson)\
**Post date:** [12 Enero, 2018 16:42 UTC](https://meta.discourse.org/t/accessibility-color-contrast/77856/1 "2018-01-12T16:42:20Z")

</div>

This is split out from the master accessibility thread: [Accessibility audit and shepherd for making improvements](https://meta.discourse.org/t/accessibility-audit-and-shepherd-for-making-improvements/66620/16). Previously directly related issues: [Accessibility: Improve contrast of text styling in default UI](https://meta.discourse.org/t/accessibility-improve-contrast-of-text-styling-in-default-ui/14632) and [Contrast and accessibility](https://meta.discourse.org/t/contrast-and-accessibility/32287) and [https://meta.discourse.org/t/improving-color-and-contrast-on-topic-progress-widget/27076](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](http://contrast-finder.tanaguru.com/result.html;jsessionid=AA609C7DCDEC027124D57CBEC05DA090?foreground=%23919191&background=%23FFFFFF&ratio=4.5&isBackgroundTested=false&algo=Rgb) can help with conversations about contrast and accessibility.

The specific examples that came out of an accessibility audit we did were:

1. The text that appears for post excerpts
2. 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](http://meta.discourse.org) on Desktop (#919191 → #767676):

before:

 ![29 AM](https://global.discourse-cdn.com/meta/original/3X/7/a/7a701f00cf0c23055d727e71942b09b9816422d1.png)

after:

 ![45 AM](https://global.discourse-cdn.com/meta/original/3X/4/9/4967ff8e94569896cb50cf9a67082ac77bd9ba1c.png)

**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:

 ![image](https://global.discourse-cdn.com/meta/original/3X/0/3/03289f3e9db9ec1cff63931830272b9a7d02a5fc.png)

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)!

 ![13 AM](https://global.discourse-cdn.com/meta/original/3X/9/e/9e0991dd20b38fbbbaa80490eec4fefe55c8e200.png)

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):

 ![39 AM](https://global.discourse-cdn.com/meta/original/3X/6/0/60be93889aa363c189f5a19e75db114269cdfece.png)

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](https://github.com/discourse/discourse/pull/4975) 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.

---

_[View the full topic](https://meta.discourse.org/t/accessibility-color-contrast/77856)._
