WCAG 2.2 Introduces New Accessibility Challenges
The Web Content Accessibility Guidelines (WCAG) 2.2, recently finalized, brings several new success criteria designed to improve web accessibility. For frontend developers, three of these new criteria are particularly impactful, requiring new considerations in CSS development: 2.5.8 Target Size (Minimum), 2.4.11 Focus Not Obscured (Minimum), and 2.4.12 Focus Appearance (Minimum). These criteria did not exist in WCAG 2.1, meaning existing linters and development practices may not cover them.
A recent analysis of a typical EU SaaS weekly stylesheet revealed 14 findings from a WCAG 2.2 CSS linting scan, with 61 lines of CSS being flagged. While many findings relate to established criteria, three new ones stood out due to their novelty and potential impact on UI design and development. These new rules address fundamental aspects of user interaction: ensuring interactive elements are large enough to be easily targeted and that focus indicators are sufficiently visible and unobscured.
The implications are significant. Developers must now actively ensure that buttons, links, form inputs, and other interactive elements meet minimum size requirements and that their focus states are clearly perceivable, even when other elements might overlap them. This isn't just about aesthetics; it's about making the web usable for individuals with motor impairments, low vision, or cognitive disabilities.
Understanding the New Criteria
2.5.8 Target Size (Minimum)
This criterion requires that all pointer target inputs (like buttons, links, and form controls) have a minimum size. For most interactive elements, the minimum target size is 24 by 24 CSS pixels. If an element is smaller than this, it must have a minimum spacing of 8 CSS pixels between it and adjacent targets. This prevents users from accidentally activating the wrong element, especially on touch devices.
Consider a mobile interface where multiple small buttons are placed close together. Without sufficient target size or spacing, a user might tap the "delete" button when they intended to tap "edit." WCAG 2.2 2.5.8 aims to eliminate this frustration by setting a clear minimum threshold for interactive elements.

2.4.11 Focus Not Obscured (Minimum)
This new criterion addresses the visibility of focus indicators. It mandates that when a component has focus, at least part of the focus indicator must be visible and not obscured by other user interface components. Specifically, at least 50% of the focus indicator must be visible when the component is in its normal or expanded state, and at least 25% must be visible when the component is in its smallest state (e.g., a collapsed dropdown menu).
This is crucial for keyboard navigation. Users relying on keyboards need a clear visual cue to know which element on the page they are currently interacting with. If a sticky header, a modal, or a persistent notification bar covers a significant portion of the focus indicator, the user can easily lose their place on the page, making navigation difficult or impossible.
2.4.12 Focus Appearance (Minimum)
Complementing 2.4.11, this criterion focuses on the visual distinctiveness of the focus indicator itself. It requires that the focus indicator has a contrast ratio of at least 3:1 against the adjacent non-focus-causing background and has an area of at least the size of the area of the unfocused component. Alternatively, the unfocused component must have a border of at least 2 CSS pixels that is a single solid color.
This ensures that the focus indicator is not just present but also clearly perceptible, especially for users with low vision. A subtle or low-contrast focus ring can be easily missed, leading to confusion. The new rules provide clear, measurable standards for what constitutes an adequate focus appearance.
Integrating WCAG 2.2 Linting into Development Workflows
The introduction of these new criteria necessitates updates to CSS linters and automated testing tools. Developers can now leverage tools that specifically check for compliance with WCAG 2.2's focus and target size requirements. This proactive approach helps catch potential accessibility issues early in the development cycle, before they become costly to fix.
For instance, a CSS linter configured for WCAG 2.2 could flag a button that is only 16x16 pixels without adequate spacing, or a focus outline that is completely hidden by a fixed header. This allows developers to address these issues with targeted CSS adjustments, such as increasing button padding, adding margin between elements, or modifying the `outline` or `box-shadow` properties for focus states.
The practical application involves writing CSS rules that adhere to these new guidelines. For target size, this might mean ensuring all interactive elements are at least 24x24px or have sufficient padding. For focus appearance, it means using `outline` properties with sufficient thickness and contrast, or `box-shadow` for a more visually appealing but still compliant focus state. Developers need to be mindful of how their CSS impacts not just the visual design but also the underlying accessibility of the interactive elements.
The journey to web accessibility is ongoing. With WCAG 2.2, the focus on interaction design and visual cues for users with disabilities is sharpened. Frontend developers must integrate these new standards into their daily coding practices and tooling to build more inclusive web experiences.
