This blog looks at how to use colour coding on your website in an accessible way. It’s part of a series called Accessibility Intentions, which is for people who want to do the right thing for accessibility, but aren’t sure how.
For more context and definitions of some terms I use here, read the introduction to the Accessibility Intentions series.
Cheat sheet: Just tell me what to do
If you just want to solve this as simply as possible, make sure you don’t ever use colour alone to convey any kind of meaning. Your site should work just as well in greyscale mode as it does in colour.
You can test this by changing your computer display to greyscale.
The rest of this blog explains this in more depth:
Why is it important to think about colour coding?
Using colour on your website can sometimes be a useful way to help people find their way around. But relying on colour to convey information can create barriers in two main areas.
Distinguishing colour: Just under 1 in 20 people who access your website are likely to be colour blind, and around as many will have a sight impairment. These people will find it difficult or impossible to distinguish between the colours you use.
Cognitive load: Even for people who can physically distinguish the colours, people have to remember which colour means what, or constantly cross-refer to different areas of the screen. This is difficult for everyone, but particularly for anyone who already struggles with short-term memory.
What does WCAG say about colour coding?
WCAG has only one guideline around colour coding, and it’s at A level. That means every website should meet this at minimum.
Colour should never be used as the only way of ‘conveying information, indicating an action, prompting a response, or distinguishing a visual element’. [WCAG 1.4.1]
This means things like:
- using a different colour for your link text, but not distinguishing links in any other way
- showing a graph with colour coded sections, with no other way to tell what the sections mean
- having a colour coded seating map for different priced event tickets, and no other way to distinguish ticket types
Exceptions
There are no exceptions to the colour coding issue. Relying on colour to convey information is a serious breach of accessibility regulations.
But there is a very important word in the WCAG guidance that’s easy to miss: ‘only’.
Colour should not be used as the *only* visual means of conveying information
That means you are still allowed to use it. In fact, using colour to convey information can help to make things more accessible for some groups.
This means you can still use colour to convey meaning. You just need to make sure the meaning is conveyed in alternative ways. Also, make sure the colours you do use contrast properly.
Where it gets complicated
There can be lots of different ways to solve the issue of colour coding, particularly when you do still want to use that colour to convey something.
Here are some example solutions using the scenarios I gave earlier. You might come up with different solutions that work just as well.
Links
Use a different colour for your links, but also make sure they’re underlined. Don’t use underlining in other places. That means some people can look for the colour, but it’s clear to everyone that underlined text is a link.
Graphs
For graphs and charts, use a pattern as well as a colour to show what the different areas mean. If there are too many sections for this to work well, show the information in an alternative way, too. For example, use a table. That way, people can pick the best way for them to understand the information. This approach solves issues around alt text, too.
Pie charts
For something like a seating chart, use symbols as well as colours to show different ticket types. That means people can access that information in two ways.
As a side note, make sure the ticket selector tool is accessible in other ways. They can break easily for people using assistive technology, or even just a mobile phone.
Free tools
I don’t know of any tool that can check colour coding issues for you. It’s one of the limits of automated testing; a computer can’t tell the intentions behind your use of colour.
A good tip is to turn your computer settings to greyscale and make sure your site still works. In most computers, you can to this by going to ‘Settings’ then ‘Accessibility’.
Get in touch
If you have feedback on this post, or want help with anything else to do with accessible and inclusive content, you can get in touch via email or social media.