Mobile app version of vmapp.org
Login or Join
Harper822

: Does a script tag really need a color defined? 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

@Harper822

Posted in: #Accessibility #Colors #Html #Javascript

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?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Harper822

1 Comments

Sorted by latest first Latest Oldest Best

 

@Shanna517

Observations: achecker.ca lists it as "potential problem" (instead of "known" or "likely"). They document this script check in 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:


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;}.
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).
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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme