2

I went to achecker.ca to test my website for accessibility issues. While it found no actual problems, it found about 100 potential issues. One of them is this:

 1.4 Distinguishable: Make it easier for users to see and 
 hear content including separating foreground from background.

 Success Criteria 1.4.1 Use of Colour (A)

 Check 86: script may use color alone.  Line n, Column n: 

<script async src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>

This potential issue refers to all internal and external javascript on my site including google adsense script.

My question is, do I really need to specifically define a default color for such elements or is this tool a joke?

  • 1
    I can only think that maybe if a script does a document.write() and the containing element does not have color defined?! But otherwise this does seem crazy; I've not heard of styling the script element itself before?! – MrWhite Jan 3 '16 at 17:57
  • 1
    If you do specify a color for the script element does this mute the warning? (Or is it actually referring to something else?) – MrWhite Jan 3 '16 at 18:00
  • 1
    Keep in mind that some of these online sites make too many assumptions and some are a bit crazy. You have to take all of them with serious salt. If you need some, I can send you a supply. – closetnoc Jan 3 '16 at 19:38
  • Well, If these hints make me richer, I'll take them with serious rocks, let alone salt. – Mike Jan 3 '16 at 19:58
  • If the checking program doesn't know what your script does (send text to the browser or something else) and/or sees it load before any css info, it can't know if you have set proper (readable) foreground /background combination. So it throws a warning. Just a guess. Have you set body background-color and color values? – user59219 Jan 4 '16 at 11:05
1

Observations: achecker.ca lists it as "potential problem" (instead of "known" or "likely"). They document this script check in http://achecker.ca/checker/suggestion.php?id=86. They seem to justify the problem with guideline 1.4.1 Use of Color from WCAG 2.0.

Let’s see:

  1. You could only have a color-related accessibility problem with a script element if you display this script element, for example with the CSS script {display:block;}.

  2. Assuming that you display the script element, you could only fail the WCAG 2.0 guideline 1.4.1 Use of Color if the script element’s color is used for a certain meaning¹ (instead of being pure decoration).

  3. Assuming that you use the script element’s color for a certain meaning¹, you could only fail that guideline if you don’t provide an alternative² to the color (e.g., text).

A tool can’t possibly check for 2. (if the color has a meaning¹) and 3. (if you provide an alternative²), so it would have to be always a potential problem, and for all (visible) HTML elements (script is nothing special here).

tl;dr: Ignore it unless you display the script element.

¹ A meaning could be, for example, when refering to the script element’s content via its color: "See the JSON in red", "The blue text is authored by Alice", "Additions are green" and so on.

² An alternative could be, for example, when refering to the script element’s content via its color and a textual character, an underline, etc. in addition: "See the JSON in red (marked with a *)", "The bold blue text is authored by Alice", "Additions are underlined and green" and so on.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.