Skip to content
On this page Definition and vocabulary

Concepts

Targets and focus

How big a control must be, how to keep keyboard focus visible and never hidden by sticky UI, and how modal dialogs manage focus. The WCAG minimums, the larger sizes we choose, and how the library applies them.

A control people cannot hit, a focus ring they cannot see, and a dialog that lets focus escape are three of the most common ways an interface stops working for someone. The standards say what is required. This page says what they require, what they do not, and where our defaults go further.

Definition and vocabulary

Term What it means here
Target The area that responds to a pointer: the whole clickable region, which may be larger than what is drawn.
CSS pixel The unit of the criteria. It is not a physical pixel and not a device model.
Minimum level WCAG’s AA threshold. A floor for conformance, not a design target.
Focus indicator The visible mark on the control that has keyboard focus.
Obscured focus Focus on a control that author content, such as a sticky bar, covers.
Modal dialog A window that makes the page behind it unavailable until it closes.

Evidence

Standard or guidelineW3C WAI 2023

The target for pointer inputs is at least 24 by 24 CSS pixels, unless an exception applies. The criterion does not require 44 pixels. 44 is a larger size some platforms recommend, and it is the size our touch default uses.

Scope: WCAG 2.2 Understanding document for 2.5.8, Level AA. It lists exceptions for spacing, equivalent controls, inline text, user-agent controls and essential sizes.

Standard or guidelineW3C WAI 2023

When a control receives keyboard focus, it must not be entirely hidden by author-created content. A sticky header or an action bar that covers the focused field breaks it.

Scope: WCAG 2.2 Understanding document for 2.4.11, Level AA. The minimum level forbids focus being entirely hidden; partly hidden focus is not covered.

Standard or guidelineW3C WAI 2023

Visual cues needed to identify a control or its state must reach 3:1 against the background. A hairline border that identifies a field is a cue; a decorative one is not. Thin lines can lose perceived contrast to anti-aliasing, so measure the ones that carry meaning.

Scope: WCAG 2.2 Understanding document for 1.4.11. It notes that authors do not control anti-aliasing and sets no minimum line width.

Standard or guidelineW3C WAI 2023

Text can be resized up to 200 percent without assistive technology and without loss of content or functionality. A control with a fixed pixel height that clips its label fails when the text grows.

Scope: WCAG 2.2 Understanding document for 1.4.4, Level AA. It says text, not pages: check the criterion for what counts as resizing.

Standard or guidelineW3C WAI-ARIA 2024

In a modal dialog focus moves in on open, Tab and Shift+Tab stay inside, and Escape closes it.

Scope: The ARIA Authoring Practices Guide: a recommended pattern, not a conformance criterion.

The contract

Our judgement

Draw small, hit big. A control may look as small as the design wants, as long as its hit area reaches the size for the input. On touch, aim for 44 CSS px; treat 24 as the floor you must not go below.

Our judgement

Make spacing count. Two small targets with enough room between them can meet the minimum where one cramped pair cannot. Check the neighbors, not only the control.

Our judgement

Pad for what you pin. Any sticky or fixed bar declares its height so scrolling and focus leave room for it. Focus must never land under it.

Our judgement

A visible, high-contrast ring is not decoration. Show focus for keyboard users every time, in a color that passes 3:1 on every surface the control can sit on.

Our judgement

Use the platform dialog. A modal either uses the native dialog or a component that traps focus, and closes on Escape. Write no hand-rolled version.

How the library implements it

Need In @codeatlasdev/ui
44px touch size --ca-touch-target (44px). Under (pointer: coarse) control heights grow to it, and small controls (switch, checkbox, radio, icon buttons, pagers, chips) get an invisible 44 by 44 hit area centred on them.
Do not write an override The coarse-pointer rules are global; an app does not add its own.
Focus ring :focus-visible with --ca-focus-ring and --ca-focus-ring-offset; in nativeFeel() shells it shows only while the person navigates by keyboard (html[data-kbd]).
Focus never under sticky UI scroll-padding-block on :root reserves --ca-sticky-top (default the header height) plus the safe area at the top and --ca-sticky-bottom plus the safe area at the bottom. An app with taller chrome sets those two variables.
Modal dialogs Native dialog overlays portaled to the body, with the page behind made inert; focus moves in, Tab stays inside and Escape closes. See Dialog.
Keyboard with a pinned bar StickyActions and MobilePane add safe-area padding and keyboard awareness.
Contrast of outlines tests/contrast.test.ts measures 3:1 for outlines in every preset.
/* An app whose sticky header is taller than the default tells the page so. */
:root {
  --ca-sticky-top: 72px;
  --ca-sticky-bottom: 64px;
}

Anti-patterns

Anti-pattern Why it fails Instead
An 18px icon button with no extra hit area Below the minimum, hard to hit. Keep the look, enlarge the hit area.
outline: none with no replacement Keyboard users lose their place. :focus-visible with the ring token.
A sticky footer that covers the focused field Focus is entirely hidden. Reserve its height in --ca-sticky-bottom.
A 1px pale border as the only sign of an input A cue that can fall under 3:1. A border or fill that measures 3:1 against the background.
height: 36px on a button whose label can wrap Clips at 200% text. min-height, padding in rem.
A custom modal with no focus trap Focus escapes to the page behind. The library’s Dialog, Sheet or MobilePane.
Two tiny targets side by side Mis-taps, and may fail the spacing exception. Add space or enlarge one.

Checklist

  • Every pointer target is at least 24 by 24 CSS px, or has an exception you can name.
  • On touch, primary controls reach 44 px.
  • Focus is visible on every control, in light, dark and high-contrast.
  • Tab through the page: focus never ends up entirely under a sticky bar.
  • Controls that identify a field or state measure 3:1 against their background.
  • At 200% text no label is clipped.
  • Open each dialog: focus moves in, Tab stays inside and Escape closes.

Prompt for your AI

Make every control reachable and visible. Pointer targets are at least 24 by 24 CSS px (WCAG 2.5.8) and primary touch controls 44 px; draw small controls small but give them a 44 px hit area. Use @codeatlasdev/ui controls: the coarse-pointer sizing is global, so write no override and no cursor: pointer.

Never remove the focus outline without replacing it; use :focus-visible with --ca-focus-ring. If a header or bar is sticky or fixed, set --ca-sticky-top or --ca-sticky-bottom so scroll-padding keeps focus clear of it. Any border or fill that identifies a control or state must reach 3:1 contrast.

Use Dialog, Sheet or MobilePane for modals so focus moves in, stays inside and Escape closes. Use min-height and rem padding on controls so text at 200% does not clip. Treat 44 px as our default and 24 px as the standard's minimum, and do not say the standard requires 44.

References

  1. W3C WAI (2023). Understanding SC 2.5.8: Target Size (Minimum). W3C WAI, WCAG 2.2 Understanding (Level AA).Standard or guideline

    Supports: The target for pointer inputs is at least 24 by 24 CSS pixels, except where spacing, equivalence, inline, user-agent or essential exceptions apply.

    Does not support: That 44 px is required. 44 px is a larger recommendation, not this criterion.

    Checked 2026-10-25.

  2. W3C WAI (2023). Understanding SC 2.4.11: Focus Not Obscured (Minimum). W3C WAI, WCAG 2.2 Understanding (Level AA).Standard or guideline

    Supports: When a user interface component receives keyboard focus, it is not entirely hidden due to author-created content.

    Does not support: That partly hidden focus is fine: the minimum level only forbids it being entirely hidden.

    Checked 2026-10-25.

  3. W3C WAI (2023). Understanding SC 1.4.11: Non-text Contrast. W3C WAI, WCAG 2.2 Understanding (Level AA).Standard or guideline

    Supports: Meaningful visual cues must achieve 3:1 against the background. The document notes authors do not control font smoothing and anti-aliasing, so evaluation uses the colors obtained from the user agent or the markup.

    Does not support: That thin lines are always inadequate. The document does not set a minimum line width.

    Checked 2026-10-25.

  4. W3C WAI (2023). Understanding SC 1.4.4: Resize Text. W3C WAI, WCAG 2.2 Understanding (Level AA).Standard or guideline

    Supports: Text can be resized without assistive technology up to 200 percent without loss of content or functionality.

    Does not support: Behavior of page zoom versus text-only zoom in a given browser; check the criterion text for what counts.

    Checked 2026-10-25.

  5. W3C WAI-ARIA (2024). Dialog (Modal) Pattern, ARIA Authoring Practices Guide. W3C WAI-ARIA APG.Standard or guideline

    Supports: In a modal dialog focus moves into the dialog on open, Tab and Shift+Tab stay inside, and Escape closes it.

    Does not support: A requirement: the APG documents recommended patterns, not conformance criteria.

    Checked 2026-10-25.