Skip to content

Glossary

Target size

Target size is the area a pointer can hit to use a control, which can be larger than what is drawn. WCAG 2.2's criterion 2.5.8 asks for at least 24 by 24 CSS pixels at level AA, with exceptions for well-spaced targets, links inside sentences and a few others. Meadowstack keeps a dense 16px checkbox in tables and gives it a 32px hit area, and an audit rule measures it on every demo screen.

By Bohuslav PoláčekChecked

e2e/audit/rules.ts
// target-size
const toggles = document.querySelectorAll(
  '[role="checkbox"], [role="radio"], input[type="checkbox"], input[type="radio"]',
);
for (const toggle of Array.from(toggles)) {
  if (!visible(toggle) || toggle.matches(":disabled, [aria-disabled='true'], [data-disabled]")) continue;
  const own = toggle.getBoundingClientRect();
  const label =
    toggle.closest("label") ??
    (toggle.id ? document.querySelector(`label[for="${CSS.escape(toggle.id)}"]`) : null);
  const hit = label && visible(label) ? label.getBoundingClientRect() : own;
  // The kit's Checkbox draws 16px and takes clicks over a 32px ::before around it (before:-inset-2): a
  // positioned pseudo-element of the control is part of its target, so its used size counts too.
  const before = getComputedStyle(toggle, "::before");
  const pseudo =
    before.content !== "none" && before.position === "absolute"
      ? { width: parseFloat(before.width) || 0, height: parseFloat(before.height) || 0 }
      : { width: 0, height: 0 };
  const w = Math.max(own.width, hit.width, pseudo.width);
  const h = Math.max(own.height, hit.height, pseudo.height);
  if (w < 24 - 0.5 || h < 24 - 0.5) {
    add("target-size", `${describe(toggle)} is hit over ${Math.round(w)} × ${Math.round(h)}px`);
The review audit's target-size rule: every visible checkbox and radio must be hit over 24 by 24px, counting its label and the kit's larger hit area.

Why it matters in a business app

Business tables are dense: 13px text, rows of about 40px, a checkbox in the first column. Drawn at 16px, that checkbox is a small target for anyone with a tremor, a trackpad on a train or a thumb on a tablet in a warehouse, and a miss selects the wrong order.

Making everything larger costs rows on screen. The way out is to separate what is drawn from what is hit: the box stays 16px, the area around it takes the click.

How Meadowstack handles it

  • Larger hit areas. The kit's Checkbox draws 16px and takes clicks over a 32px area around it. In DataTable the whole 40px checkbox cell is the checkbox's label, so it is the target.
  • Larger controls on touch screens. Buttons are 32px (28px small); on a touch screen (pointer: coarse) they grow to 40 and 36px.
  • Measured. npm run audit opens every demo screen at 1440 and 390px and fails a checkbox or radio hit over less than 24 by 24px. Other targets go through axe's own target-size rule, which applies WCAG's spacing exception.
  • The website goes further. On a touch screen every control on the marketing site that stands on its own is at least 44 by 44px; a link inside a sentence keeps the line.

Common mistakes

  • Growing the drawing instead of the hit area. A 24px checkbox makes every table row taller; a larger hit area does not.
  • Icon buttons at 20px. Row actions such as "…" are the usual failures.
  • Hit areas that overlap. Two 32px areas on controls 16px apart share pixels, and the click goes to whichever is on top.

Questions

What is the minimum target size in WCAG 2.2?

24 by 24 CSS pixels at level AA (2.5.8), unless the target is spaced so that a 24px circle centred on it does not intersect another target or another small target's circle, has an equivalent control that meets the size, sits inside a sentence, is sized by the browser, or must look the way it does.

Does the visible size have to be 24 pixels?

No. The target is the area that responds to the pointer. A 16px checkbox with a 32px clickable area around it meets the criterion.

Are links in a sentence exempt?

Yes. A target inside a sentence, or one whose size is set by the line height of the text around it, is one of the exceptions.

Two ways

Build it yourself, or have it built

  • Build it yourself

    Build your app on the framework

    Get the codebase these apps stand on and build yours with Claude Code, Cursor or Codex.

    One payment, lifetime updates

    Get the framework
  • Have it built

    Have us build your app

    Tell us how your team works. We plan the app with you and build it on the same framework at a fixed price.

    After launch, Care keeps it improving, from €99 a month.

    from €1,990

    Describe your app