We'd like to set Google Analytics cookies to learn how people use the Knowledge Base, so we can improve it. We set them only if you accept.

Skip to main content
Digital Accessibility Knowledge Base

low-focus-contrast

Web validation

A focus indicator based on a change of color, or on changed or added pixels, must have a contrast of at least 3:1 against its background.

The focus indicator shows keyboard users which element is currently active. Whether it is an outline, a border, an underline, or a change of color, the pixels that make up the indicator must stand out from the colors around them. When the indicator's contrast against its background is lower than 3:1, users with low vision, color vision deficiencies, or reduced contrast sensitivity may not be able to see it. If these users also navigate with a keyboard, they may lose track of where they are and struggle to operate the interface.

Pass Patterns

High-contrast focus outline

The dark blue outline has a contrast of about 8:1 against the white page background.

HTML
<style>
    body { background: #ffffff; }
    .button:focus-visible {
        outline: 3px solid #1a4f9c;
        outline-offset: 2px;
    }
</style>


<button class="button">Save</button>

Color change that contrasts with the background

On focus, the link's background changes to a dark color that contrasts with the white page at about 16.5:1, with white text on top.

HTML
<style>
    body { background: #ffffff; }
    .nav-link:focus-visible {
        background: #1f1f1f;
        color: #ffffff;
        outline: none;
    }
</style>


<a class="nav-link" href="/pricing">Pricing</a>

Fail Patterns

Light focus outline on a white background

The light gray outline has a contrast of only about 1.4:1 against the white background, so it is hard to see.

HTML
<style>
    body { background: #ffffff; }
    .button:focus-visible {
        outline: 2px solid #dddddd;
    }
</style>


<button class="button">Save</button>

Subtle color change on focus

On focus, the link's background changes to a very light color that contrasts with the white page at only about 1.1:1.

HTML
<style>
    body { background: #ffffff; }
    .nav-link:focus-visible {
        background: #f2f2f2;
        outline: none;
    }
</style>


<a class="nav-link" href="/pricing">Pricing</a>

WCAG techniques

Sufficient techniques

Try It Yourself

Using a keyboard

  1. Load the page.
  2. Press Tab to move focus to each interactive element.
  3. Check whether the focus indicator is easy to see against the background around it.

Expected results: The focus indicator is clearly visible on every element.

Actual results: The focus indicator is faint or hard to distinguish from the background.

Using a color contrast checker

  1. Move focus to the element, and identify the color of the focus indicator and the color of the background next to it.
  2. Open a browser extension or online color contrast checker.
  3. Enter the two colors.

Expected results: The contrast ratio is at least 3:1.

Actual results: The contrast ratio is below 3:1.

FAQ

How does this issue relate to 1.4.11 Non-text Contrast?

SC 1.4.11 requires the visual information needed to identify a user interface component and its states to have a contrast of at least 3:1 against adjacent colors. The focus indicator is the visual information that shows an element's focused state, so its pixels must meet 3:1 against the background next to them.

Why is this issue marked as Serious?

A focus indicator that cannot be seen leaves keyboard users with low vision or color vision deficiencies unsure which element is active. They may activate the wrong control or be unable to continue, so it is rated serious.

Must the focused and unfocused states contrast with each other?

Not under SC 1.4.11. It requires the focus indicator to contrast with its adjacent colors, but does not require a minimum contrast between the focused and unfocused states. That stricter requirement belongs to SC 2.4.13 Focus Appearance (Level AAA). Note that if the only difference between the two states is a change of hue, SC 1.4.1 Use of Color may also apply.

Standards and Regulations

StandardSuccess CriterionReference
WCAG 2.21.4.11 Non-text Contrast (AA)The visual presentation of user interface components and graphical objects required to understand content has a contrast ratio of at least 3:1 against adjacent colors, except for inactive components, purely decorative elements, and elements with no visual boundary indicating state.
EN 301 5499.1.4.11 Non-text ContrastSame as the WCAG text.

Personas impacted by this issue

Learn More