December 10th, 2014

scotto monkeypulse

For the sake of CSS / 508 compatability – contrasting colors and bg

Section 508 1194.22(d): “Element specifies background color but not specify foreground (text) color”

wpid-medium_ColorBurstAction387.jpg

If I use background-color: [whatever color];
the parameter color: [whatever legible 508 compliant legibility color, or at least inherit]; will be contained with it.

Section 508 1194.22(d): “Element specifies background color but not specify foreground (text) color”

If the author specifies a foreground text color then they should also specify a background color which has sufficient contrast with the foreground and vice versa.

User needs to review all cascading style sheet values for the page. Make sure that all background color values “bgcolor” have a corresponding text color value “color.” This is required to allow visually impaired users to control foreground and background colors through personal stylesheets or other means.

If the site is failing this checkpoint, it is usually due to table, divs, among other tags where either the attribute color or the attribute background-color have not been specified, alongside one another.

For example, you could have something specified

 <div style="color: blue;"></div>

which would fail because there is no background color specified.

 <div style="color: blue; background-color: white;"></div>

Would fly.

Originally published at The Scotto Grotto. You can comment here or there.