Should elements’ states match contrast ratios requirements in WCAG ?

In the realm of web accessibility, color contrast is not just about aesthetics; it is a fundamental requirement. This article focuses on the technical aspects of color contrast, particularly for interactive elements in different states like hover and focus. Finally we will explore whether these states need to meet specific contrast criteria to ensure WCAG compliance and improve web accessibility.

WCAG contrast requirements

Let’s start with text contrast ratios, like the 4.5:1 minimum for normal-sized text in WCAG’s 1.4.3, become your guiding principles. They dictate that the text you display must have enough contrast against its background, making it readable for a broad range of users. This means choosing text and background colors that meet these contrast standards. For larger text or headlines, you can lower the ratio to 3:1.

Now, consider non-text elements such as chevrons, icons, and checkboxes. WCAG’s 1.4.11 reminds us that these elements need to contrast well with their surroundings too, with a ratio of at least 3:1. This ensures that interactive components stand out clearly and are easily distinguishable from the background. As a designer or developer, you’ll need to select colors for these elements carefully, keeping accessibility in mind.

States and styles

When designing interactive elements like buttons or links, it’s essential to consider how they appear when they receive keyboard focus. This focus state, as per the WCAG guideline 2.4.7, should be visually distinguishable, often achieved through a border, outline, or color change. This ensures that users who rely on keyboards or assistive technology can easily understand where they are on the page and interact effectively. Designers and developers should prioritize creating clear and consistent focus styles for these elements to enhance web accessibility.

It’s important to note that WCAG doesn’t provide specific requirements for styling interactive elements in various states like hover or active. While WCAG focuses primarily on the visibility of keyboard focus (as outlined in guideline 2.4.7), it’s still considered a best practice to design hover states and other interactive states for a better user experience.

This raises an interesting question: are there contrast requirements between these different states themselves?

The answer…

…is no : WCAG doesn’t require specific contrast ratios between the different states of interactive elements such as hover or active. WCAG primarily focuses on ensuring that text and non-text contrast ratios are met and maintained in all states, ensuring readability and accessibility. In other words, the contrast between text and its background, as well as non-text elements and their surroundings, must meet the specified criteria in all scenarios.

While there are no specific contrast requirements between these different states for WCAG compliance, it is still considered a good practice to design and implement them with sufficient contrast to enhance the user experience. This approach can help ensure that users, including those with disabilities, can easily perceive and understand which elements are interactive and their states, even though it’s not a strict requirement for WCAG compliance.

I hope this clears up the question. It took me a while to be sure about it because WCAG doesn’t list all the things that it doesn’t have requirements for, and I could never be certain. But now I know, and hopefully you do too!