alphagov / tech-docs-gem

Gem to distribute the tech docs project
https://tdt-documentation.london.cloudapps.digital/
MIT License
15 stars 38 forks source link

Reported a11y issue: Some code examples use a colour that has very low contrast with the background colour #213

Closed richardTowers closed 3 years ago

richardTowers commented 3 years ago

This was reported in a recent accessibility audit

I'm not 100% it's true though. Looking at all the highlight colours in the stylesheet with:

<pre class="highlight ruby"><code><span class="cs">cs</span>    <span class="kr">kr</span>  <span class="kn">kn</span>  <span class="kt">kt</span>
<span class="ow">ow</span>  <span class="py">py</span>  <span class="nn">nn</span>  <span class="nf">nf</span>  <span class="vi">vi</span>
<span class="nd">nd</span>  <span class="nx">nx</span>  <span class="ne">ne</span>  <span class="l">l</span>    <span class="ld">ld</span>
<span class="mo">mo</span>  <span class="sh">sh</span>  <span class="ss">ss</span>  <span class="si">si</span>  <span class="sd">sd</span>
<span class="sc">sc</span>  <span class="gi">gi</span>  <span class="gd">gd</span>  <span class="p">p</span>    <span class="w">w</span>
<span class="hll">hll</span>    <span class="gt">gt</span>  <span class="gs">gs</span>  <span class="ge">ge</span>  <span class="gh">gh</span>
<span class="gu">gu</span>  <span class="gp">gp</span></code></pre>

Renders as:

image

Firefox's Accessibility tools report that all of these are at least AA compliant, so I'm not sure this is a real issue.

I'm raising it here as a better place for discussion than a spreadsheet. If we don't think it's reproducible then we can probably close it and cross it off our list of issues.

jonathanglassman commented 3 years ago

@selfthinker can you advise?

36degrees commented 3 years ago

When was the audit done / what version of the gem was it against?

Is there any chance it was resolved by https://github.com/alphagov/tech-docs-gem/pull/189? Looks like it shipped in v2.0.13.

richardTowers commented 3 years ago

Possibly. The audit was done in August, which is just a little bit after that shipped. I can't find a reference to this in the original report, so I'm inclined to think it's not a real issue.