WCAG Success Criteria · Level AAA

WCAG 2.4.13: Focus Appearance

WCAG 2.4.13 requires that keyboard focus indicators meet minimum size and contrast requirements so that users can clearly see which element has focus. This criterion ensures that people who rely on keyboards or assistive technologies can navigate interfaces without losing track of their current position.

  • Level AAA
  • Wcag
  • Wcag 2 2 aaa
  • Operable
  • Accessibility

What This Rule Means

WCAG 2.4.13 Focus Appearance is a Level AAA criterion introduced in WCAG 2.2 that sets precise, measurable requirements for the visual appearance of keyboard focus indicators. While the lower-level criterion 2.4.11 (Focus Not Obscured, Level AA) ensures the focused element is not fully hidden, and 2.4.7 (Focus Visible, Level AA) simply requires that some focus indicator exists, 2.4.13 goes further by defining how visible that indicator must be.

To pass this criterion, the keyboard focus indicator must satisfy all of the following conditions:

  • Minimum area: The focus indicator must have an area of at least the perimeter of the unfocused component multiplied by 2 CSS pixels. In practical terms, for a typical rectangular button, this means the focus outline must have an area equal to or greater than the button's perimeter times 2px — a focus ring at least 2px thick around the entire boundary qualifies.
  • Contrast ratio of the focus indicator: The pixels that form the focus indicator must have a contrast ratio of at least 3:1 between their focused and unfocused states. So if a button has a white background in its default state, the focus ring drawn around it must contrast at least 3:1 against that white background.
  • No reduction of contrast for enclosed content: The focus indicator must not reduce the contrast of text or other content inside the focused component to below 4.5:1 (for text under 18pt / 14pt bold) or 3:1 (for large text and non-text content).

All three conditions must be met simultaneously for a component to pass. A focus indicator that is large enough but has insufficient contrast fails. Equally, a high-contrast indicator that is too small also fails.

The WCAG specification defines one notable exception: if the browser's default focus indicator (the user-agent default) meets the requirements, the author does not need to add a custom style. However, browser defaults vary significantly — Chromium-based browsers generally provide a blue outline, while Safari may render a ring that lacks sufficient contrast in certain color schemes. Authors should verify that the default indicator meets the threshold or provide a robust custom style.

The criterion applies to all interactive and focusable components: links, buttons, form inputs, select menus, checkboxes, radio buttons, custom widget components built with ARIA roles, and any element made focusable via tabindex. It also applies to focus indicators created purely through CSS on pseudo-elements or through JavaScript-controlled class changes.

Why It Matters

Focus visibility is a critical navigation cue for a wide range of users. When focus indicators are thin, low-contrast, or absent altogether, these users lose their spatial orientation within a page — they cannot tell where they are or where they can go next.

Keyboard-only users — including people with motor impairments such as tremors, paralysis, or repetitive strain injuries — rely entirely on the keyboard to navigate. For these users, an invisible or barely visible focus indicator is not just an inconvenience; it makes the entire interface unusable. According to the World Health Organization, approximately 1.3 billion people live with some form of disability, and motor impairments represent one of the largest categories among people who avoid or cannot use a mouse.

Low-vision users who use magnification software but not a full screen reader also depend on the focus ring to orient themselves. At high zoom levels, a 1px default outline may be clipped by the viewport or simply invisible against a similarly-colored background. These users often navigate by keyboard precisely because precise mouse targeting is difficult at high magnification.

Cognitive and attention-related disabilities such as ADHD, anxiety disorders, and traumatic brain injuries can make it difficult to track visual information across a page. A highly visible, clearly differentiated focus indicator reduces the cognitive load of navigation by providing an unmistakable anchor for the user's current position.

Situational disabilities also matter: a developer testing on a low-brightness laptop screen outdoors, or an elderly user with age-related contrast sensitivity decline, may struggle with thin or low-contrast focus rings even without a clinical diagnosis.

Consider a real-world scenario: a bank's online form for transferring funds contains ten input fields and four action buttons. A user with Parkinson's disease tabs through the form using the keyboard. If the focus indicator is a default 1px dotted outline in light gray on a white background, the user cannot reliably track which field they are currently editing. They may accidentally submit a transfer to the wrong account because they could not see that focus had moved past the recipient field. A robust, high-contrast focus outline would have prevented this entirely.

Beyond accessibility, a clear focus indicator is a usability improvement for all users. Power users who frequently navigate forms and menus via keyboard — a common pattern among developers, data-entry professionals, and screen reader users — benefit from fast, reliable orientation. There is also an indirect SEO signal: sites with strong accessibility tend to have lower bounce rates and higher task completion, both of which correlate with positive ranking factors.

WCAG 2.4.13 requires manual testing because automated tools cannot fully evaluate the size and contrast of a focus indicator in every possible browser rendering context. Axe-core has no single automated rule that flags 2.4.13 failures directly. The reasons are technical:

  • Why automation is insufficient: Calculating the exact pixel area of a focus indicator requires simulating keyboard focus on every interactive element, measuring the rendered outline geometry (which depends on browser, OS, zoom level, and CSS), computing the contrast ratio of the indicator pixels against their neighbors, and verifying none of these violate the enclosed-content contrast requirement. No current automated accessibility engine reliably performs all of these steps across all components. Axe-core can flag the absence of any focus style (related to 2.4.7) but cannot measure whether the style that is present meets the 2.4.13 area and contrast thresholds.
  • Partial coverage via focus-related rules: Axe-core's focus-visible rule checks whether elements have a visible focus indicator at all. If an element has outline: none or outline: 0 with no alternative visual indicator, this rule will flag it. However, passing this rule does not guarantee compliance with 2.4.13 — an element may have a technically visible outline that is still too thin or too low-contrast.
  • Manual testing is the authoritative method: Testers must visually inspect every interactive component in a focused state, measure or estimate the outline dimensions, and verify contrast ratios using a color contrast analyzer. This is why WCAG lists 2.4.13 as a manual-test-only criterion for axe-core purposes.

How to Test

  1. Automated scan (partial signal only): Run axe DevTools or Lighthouse on the page. Look for any failures related to focus-visible or focus-order-semantics. While these will not directly flag 2.4.13 violations, they may surface elements where focus styling has been suppressed entirely, which is a prerequisite failure. In Chrome DevTools, open the Accessibility panel and use the "Tab" inspection mode to cycle through focusable elements.
  2. Visual keyboard navigation test: Disconnect or set aside your mouse. Press Tab to move through every interactive element on the page. For each focused element, visually inspect the focus indicator. Ask: Is there a clearly visible ring or other indicator? Does it appear to be at least 2px thick? Does it contrast strongly against the surrounding background? Note any elements where you hesitate or struggle to see where focus is.
  3. Contrast measurement: Use the WebAIM Contrast Checker or the Colour Contrast Analyser desktop tool. With focus on a component, take a screenshot. Sample the color of the focus indicator pixels and the color of the background immediately adjacent to it. Verify the contrast ratio is at least 3:1.
  4. Dimension measurement: Use browser DevTools (Chrome or Firefox). Select a focused element and inspect its computed styles. Check the outline-width, outline-offset, and any box-shadow used as a focus ring. Multiply the perimeter of the element (2 × width + 2 × height) by 2px to compute the minimum area. Verify the indicator's rendered area meets or exceeds this value.
  5. Screen reader + keyboard test (NVDA + Firefox): Open the page in Firefox with NVDA running. Navigate using Tab and arrow keys. Confirm that the visual focus indicator moves in sync with NVDA's announced focus. Pay special attention to custom widgets (carousels, modals, accordions) where focus management may be handled via JavaScript.
  6. VoiceOver + Safari (macOS/iOS): Enable VoiceOver with Command + F5. Use Tab to navigate interactive elements. Verify that the VoiceOver cursor (the black outline box) does not substitute for a proper CSS focus indicator — the page itself must provide one independently.
  7. High-contrast mode test: On Windows, enable High Contrast mode (Settings → Ease of Access → High Contrast). Reload the page and repeat the keyboard navigation test. Some CSS focus styles are overridden by the operating system in high-contrast mode; verify that a visible indicator still appears. Use the CSS media query forced-colors: active to conditionally adjust styles if needed.

How to Fix

Default browser outline removed — Incorrect

<!-- Many stylesheets globally suppress the default focus outline -->
<style>
  * {
    outline: none; /* Removes ALL focus indicators site-wide */
  }
  a:focus, button:focus {
    outline: 0; /* Redundant removal; no replacement provided */
  }
</style>
<button>Submit Payment</button>

Default browser outline removed — Correct

<!-- Remove the default only when providing a superior custom indicator -->
<style>
  /* Only suppress default outline when :focus-visible applies, then provide a strong replacement */
  :focus-visible {
    outline: 3px solid #0057b8; /* 3px ensures area requirement is met for typical elements */
    outline-offset: 2px;       /* Offset separates indicator from element edge for clarity */
  }
  /* Respect forced-colors (Windows High Contrast) by using system keywords */
  @media (forced-colors: active) {
    :focus-visible {
      outline: 3px solid ButtonText;
    }
  }
</style>
<button>Submit Payment</button>

Low-contrast focus ring on colored background — Incorrect

<style>
  .cta-button {
    background-color: #0057b8;
    color: #ffffff;
  }
  .cta-button:focus {
    outline: 2px solid #3399ff; /* Light blue outline on dark blue background: contrast ratio ~1.4:1 — fails */
  }
</style>
<button class='cta-button'>Book Now</button>

Low-contrast focus ring on colored background — Correct

<style>
  .cta-button {
    background-color: #0057b8;
    color: #ffffff;
  }
  .cta-button:focus-visible {
    /* White outline contrasts strongly against the dark blue button (contrast ~8:1) */
    outline: 3px solid #ffffff;
    outline-offset: 2px;
    /* A dark offset box-shadow behind the white ring ensures contrast against light page backgrounds */
    box-shadow: 0 0 0 5px #0057b8;
  }
</style>
<button class='cta-button'>Book Now</button>

Custom div-based interactive widget without focus style — Incorrect

<style>
  .tab-item { cursor: pointer; padding: 12px 20px; }
  /* No :focus or :focus-visible style defined for custom tab */
</style>
<div role='tab' tabindex='0' class='tab-item'>Reservations</div>

Custom div-based interactive widget without focus style — Correct

<style>
  .tab-item {
    cursor: pointer;
    padding: 12px 20px;
    border-radius: 4px;
  }
  /* Explicit :focus-visible style — outline-width 3px with offset meets area threshold */
  .tab-item:focus-visible {
    outline: 3px solid #d4550a; /* 3:1+ contrast against white background */
    outline-offset: 3px;
  }
</style>
<div role='tab' tabindex='0' class='tab-item'>Reservations</div>

Thin box-shadow used as focus indicator — Incorrect

<style>
  .form-input:focus {
    outline: none;
    /* 1px box-shadow spread: likely too small in area for most input sizes */
    box-shadow: 0 0 0 1px #005fcc;
  }
</style>
<input type='text' class='form-input' placeholder='Your email' />

Thin box-shadow used as focus indicator — Correct

<style>
  .form-input:focus-visible {
    outline: none;
    /*
      3px spread provides sufficient area around a typical 300px-wide input.
      #005fcc on white background yields ~5.9:1 contrast — passes both 2.4.13 (3:1) and 1.4.3 (4.5:1).
    */
    box-shadow: 0 0 0 3px #005fcc;
  }
</style>
<input type='text' class='form-input' placeholder='Your email' />

Common Mistakes

  • Using outline: none in a CSS reset without providing any replacement focus indicator. Many popular CSS resets (Normalize.css older versions, custom resets) blanket-remove outlines. Always pair removal with a :focus-visible replacement that meets size and contrast requirements.
  • Providing a focus style only for :focus but not :focus-visible, causing mouse-click focus rings on buttons that annoy sighted mouse users — leading developers to remove them entirely rather than using the correct pseudo-class split.
  • Choosing a focus ring color that closely matches the component's background color. For example, a light blue #99ccff ring on a white #ffffff background has a contrast ratio of approximately 1.5:1, far below the required 3:1.
  • Using outline-width: 1px on small components such as icon buttons or checkboxes. A 1px ring around a 24×24px icon has an area of approximately 96 square pixels, but the required minimum area for a 24×24 element is (24+24+24+24) × 2 = 192 square pixels — exactly 2px thick. A 1px outline fails this calculation.
  • Forgetting to test focus appearance on custom ARIA widgets such as role='combobox', role='listbox', or role='slider'. These components often have JavaScript-managed focus that bypasses native CSS pseudo-classes unless explicitly handled.
  • Applying a focus style only to a and button tags while neglecting input, select, textarea, and any element with tabindex='0'.
  • Overriding focus styles deep in a component library or third-party widget without realizing the override removes the visible indicator. Common culprits include UI kits like Bootstrap 4 (which set box-shadow to a subtle glow) that may not meet the 2.4.13 threshold.
  • Not testing focus appearance in Windows High Contrast mode. Some CSS outline and box-shadow techniques render invisibly in High Contrast mode. Use the @media (forced-colors: active) block to ensure a visible, system-color-based fallback.
  • Using outline-offset with a very large negative value to move the outline inside the element's border. This can cause the indicator to overlap with the element's background, reducing effective contrast below 3:1.
  • Assuming that the focus indicator on a parent container is sufficient for child interactive elements. Each focusable element must independently meet the criterion; a highlighted row in a table does not satisfy the requirement for a link cell within that row.

Relation to Turkey's Accessibility Regulations

Turkey's Presidential Circular 2025/10, published in Official Gazette No. 32933 on June 21, 2025, establishes binding web and mobile accessibility requirements for a broad set of entities operating in Turkey. The circular adopts WCAG 2.2 as its technical reference standard and mandates conformance at Level AA for covered entities. WCAG 2.4.13 Focus Appearance is a Level AAA criterion and is therefore not directly mandated by the circular for standard compliance.

However, the circular's scope is wide-ranging. Covered entities include public institutions and government agencies, banks and financial service providers, hospitals and healthcare organizations, telecommunications operators with 200,000 or more subscribers, e-commerce platforms, travel agencies, private transport companies, and private schools authorized by the Ministry of National Education (MoNE). For all of these organizations, demonstrating Level AAA conformance on applicable criteria — including 2.4.13 — signals a commitment to best-in-class accessibility that exceeds the legal baseline.

There are practical and reputational reasons for covered Turkish entities to voluntarily implement 2.4.13. Banks and financial service providers, in particular, serve customers with motor impairments who rely on keyboard navigation for secure transactions. A Turkish bank's online banking portal that meets 2.4.13 not only exceeds regulatory requirements but also reduces the risk of user error and demonstrates corporate social responsibility. Similarly, hospitals and healthcare portals where patients book appointments or access medical records should ensure that all users — including elderly patients with reduced fine motor control or low vision — can navigate those interfaces with confidence.

Telecommunications operators with large subscriber bases are among the highest-traffic digital services in Turkey. Their customer portals and self-service applications reach millions of users, including a significant proportion of older adults and users with disabilities. Voluntarily implementing 2.4.13 across these platforms ensures equitable access for all subscribers and positions the operator favorably in any future regulatory tightening that might extend mandatory conformance to AAA criteria.

For organizations seeking to achieve full WCAG 2.2 AAA conformance — whether driven by procurement requirements, export to EU markets subject to the European Accessibility Act, or internal accessibility policies — implementing 2.4.13 is a necessary component. Accsible's overlay SDK provides configurable focus enhancement features that can help organizations surface strong, compliant focus indicators across their interfaces, complementing the author-level CSS fixes described in this article.