Correct Practice
A key for accessibility is that color never be used as the only way to convey meaning. So if you indicate a bit of meaning via color, express that meaning in a secondary way as well (e.g., font weight, text decoration, shape, etc.) The best alternate is actual text).
Why? This is to ensure that users who cannot perceive color (e.g., colorblind people, screenreader users) can still get the meaning.
Examples
Highlighting Important Text
Incorrect | Correct |
---|---|
ExampleIf you proceed, your profile will be permanently deleted. ExplanationIn this case, nothing about the "permanently deleted" text is different from the rest except the color.
|
ExampleIf you proceed, your profile will be permanently deleted. ExplanationThe easiest way to correct this is by bolding or italicizing the text using the html <strong> or <em> tags.
|
Denoting Required Fields in a Form
Incorrect | Correct |
---|---|
ExampleExplanationThe “required field” information here is only indicated by the red color of the dropdown, and thus screenreader users and some colorblind users would never perceive it. |
ExampleExplanationThis method alerts many users with the red color of the asterisk but also presents that asterisk text element for others to perceive. Be sure to let users know what the asterisk means by placing explanatory text at the top of the form, along the lines of “Required fields are marked with an asterisk.” |
Referring to Colored Elements
Incorrect | Correct |
---|---|
ExampleTo change features of your service, click the orange button below: ExplanationObviously this approach is problematic for those who can’t perceive color. |
ExampleTo change features of your service, click the Modify Service button below: ExplanationRefer to the button by its visible text label and both colorblind and screenreader users will get the message. |
Presenting Differential Information Graphically
Incorrect | Correct |
---|---|
ExampleExplanationHere, presenting the status with different colors of the same shape could be mitigated for screenreaders by giving the ball icons descriptive alt text. However, it still presents problems for several types of colorblindness. Here’s how these users would see it: Red-Blind/Protanopia Green-Blind/Deuteranopia Monochromancy/Achromatopsia Hard to tell which services are running as normal and which is experiencing an outage, huh? |
ExampleExplanationAdding a differentiating visual element to the icon (e.g., the checkmark) provides additional visual information for those with color perception issues. Red-Blind/Protanopia Green-Blind/Deuteranopia Monochromancy/Achromatopsia For screenreader users, make sure the icons are appropriately labeled. Some font icon makers recommend certain techniques (e.g., see Font Awesome's guidance on labeling of its icons). |
Providing Redundant Text
Incorrect | Correct |
---|---|
ExampleLegend Red = Urgent Blue = In process Green = Check in six months
Home page Class syllabus Contact page Class description and requirements Instructor credentials Required readings ExplanationIndividuals who are blind or colorblind, and possibly other users, would not be able to effectively interpret the color styles to understand the status of each line. |
ExampleLegend Red = Urgent Blue = In process Green = Check in six months
Home page (Check in six months) Class syllabus Contact page (Urgent) Class description and requirements (In process) Instructor credentials Required readings ExplanationAdding text that redundantly indicates the item status ensures that a wider range of users will know the correct information. |