Acquia Optimize

Provide sufficient contrast between text and background colors

1.4.3 Contrast (Minimum)

This document gives information about the related Acquia Optimize checks:

  • Provide sufficient contrast between text and background colors.

What

Text should have good contrast ratio between the foreground color of the text and the background color. The contrast ratio must be at least 4.5:1 for regular text and at least 3:1 for large text. That is, large text requires slightly lower contrast than regular text for satisfying this check.

Large text is defined as; 18pt (24 CSS pixels) or 14pt (19 CSS pixels) bold text or above.

For comparison, the maximum contrast ratio, for example black text on a white background, would be 21:1.

Why

Text is easier to read when there is a good contrast ratio between the text and the background. People with low vision often have difficulty reading text that does not contrast enough with the background. Some types of color deficiencies can lower the contrast ratio even further, which makes the problem worse.

This check affects the following users who have

  • Low vision: Including many elderly due to natural age related vision loss.

  • Color blindness; Colorblind individuals have a better ability to distinguish text when there is good contrast.

  • No impairments: All users will benefit from good contrast when viewing content under special lighting conditions, such as in bright sunlight or on a screen that is dimmed due to low battery mode.

User story

Emily, 63 years:

“When I forget to bring my glasses, there are many websites that are hard for me to read. – When they use light gray text color it is also hard to see anything on my smartphone when I am outside in sunlight”.

Examples

A web page that has a text box with important information. The text in the box is written in green, but hard to read because it is a green shade on a slightly lighter green background. The two greens are too similar, which makes it difficult to see the text clearly.

In this next example the colors are adjusted to white text on dark green background for better contrast.

How

How to fix it:

  1. Click Accessibility (icon of a human with arms outstretched) on the menu bar. The Accessibility dashboard opens.

  2. Click Checklist from the from the menu on the left.

  3. Select the AA compliance level to filter for on the Accessibility Checklist page. The filters are located directly above the list.

  4. Find the check in the list called, “Provide sufficient contrast between text and background colors” (you can use the search bar to assist with this.)

  5. Click on the number of pages on the same row as the check on the far right. The pages with errors pane opens.

  6. On the same row as a page, click Inspect page with browser extension (magnifying glass icon).

  7. On the page in the web browser extension, click Highlight (magnifying glass icon).

  8. Click Cancel so the yellow box disappears.

  9. Calculate the luminosity contrast ratio between the text and the background color. To do this:

    1. Use a color picker like ColorZilla (Google Chrome extension) to “pick” the text color from the issued text.

    2. Paste the color code into the “Foreground color picker” on the Contrast Checker. (If you are using ColorZilla, the color code will automatically copy to your clipboard.)

  10. Repeat the process for the background color.

  11. In your CMS, adjust the contrast so that it is at least 4.5:1 for regular text and at least 3:1 for large text. Large text is defined as 18pt (24 CSS pixels) or 14pt (19 CSS pixels) bold text or above.

    Tip!

    You can use the Acquia Optimize Contrast Checker to identify a color that will increase the contrast!

Who in your team can typically fix this?

  • Web team: Such as those with competencies in visual design or front-end development for changes in your CMS/website template.

  • Content authoring: When special styling is applied through the content.

Additional resources

This section contains useful resources for this subject.

WCAG success criteria

Other resources

Did not find what you were looking for?

If this content did not answer your questions, try searching or contacting our support team for further assistance.

Acquia Help

Filter by product:

Acquia Optimize common questions