# Make the next action accessible

A service-business web app exists to move a visitor to one next action: book the appointment, confirm the quote, answer the follow-up. If that action is hard to reach by keyboard, hard to see, or slow to respond, the interface has failed at its one job. Accessibility is the quality of that path.

General technical guide, not a description of a deployed system; code is a minimal synthetic illustration. AI-assisted draft prepared for human technical review by GILNEX.

## Focus order follows the document

WCAG 2.2 criterion 2.1.1 (Keyboard, Level A) requires all functionality to be operable by keyboard, and 2.4.3 (Focus Order, Level A) requires the focus order to preserve meaning and operability. Both are decided by the DOM: tab order follows document order, so a confusing tab sequence is fixed by reordering the markup, not by patching tabindex.

Never use a positive tabindex value: it pulls an element out of the natural order and breaks the model for keyboard users and the next developer. Use tabindex="0" only to make a custom widget focusable in its natural position, and tabindex="-1" only for elements focused by script, such as a dialog on open.

Test it as a keyboard user does: unplug the mouse and Tab from the top. Every clickable action must be reachable, operable with Enter or Space, and in the order a sighted reader would expect.

## Show where focus is

Criterion 2.4.7 (Focus Visible, Level AA) requires a visible keyboard focus indicator; the common failure is a global outline: none with no replacement. Use :focus-visible so the indicator appears for keyboard users without drawing rings around every mouse click:

```css
:focus-visible {
  outline: 3px solid #1a56db;
  outline-offset: 2px;
}
```

WCAG 2.2 added 2.4.11 (Focus Not Obscured, Minimum, Level AA): a focused element must not be entirely hidden behind sticky headers, footers, or cookie banners. Leave scroll padding for sticky chrome, and verify the focused element is actually visible.

## The label is the name

Criterion 2.5.3 (Label in Name, Level A) requires the accessible name of a control to contain its visible label text — voice-input users activate controls by speaking the text they see. A button reading "Book appointment" with aria-label="Submit" fails: the spoken command matches nothing.

```html
<button type="button">Book appointment</button>
```

A native button already has the right role, keyboard behavior, and an accessible name from its text — the first rule of ARIA is not to use ARIA when a native element provides the semantics. Use aria-label only where there is no visible text, such as an icon-only button, and say exactly what the button does. Never use a placeholder as a label: it disappears on input and many screen readers ignore it; use a real label element or aria-labelledby pointing at visible text.

## Contrast and target size are part of the same path

Criterion 1.4.3 (Contrast, Minimum, Level AA) requires text at 4.5:1 against its background (3:1 for large text). Light-grey helper text on a white card is the usual failure; measure rendered pixels, not the design file's colour value. WCAG 2.2's 2.5.8 (Target Size, Minimum, Level AA) requires targets of at least 24 by 24 CSS pixels; for small icon buttons, add padding rather than shrinking the icon.

## Responsiveness you can measure: INP

Accessibility also covers whether the interface answers. Interaction to Next Paint (INP) is the Core Web Vital that measures responsiveness: the latency from a click, tap, or key press to the next frame the browser paints in response. It replaced First Input Delay in March 2024, observes all interactions across a visit, and reports the longest, ignoring outliers. web.dev sets the good threshold at 200 milliseconds or less at the 75th percentile of page loads in the field, needs improvement between 200 and 500, and poor above 500.

An interaction's latency has three parts: input delay while the main thread is busy, processing duration while handlers run, and presentation delay while the browser paints. The dominant cause of poor INP is JavaScript on the main thread, so the fixes are structural: break up long tasks (any task over 50 milliseconds), drop unnecessary JavaScript, and keep rendering updates small. A handler that re-renders a whole list before the browser paints feels broken: the key press registers, nothing happens, and the user presses again.

The Event Timing API, documented by web.dev, finds the slow interactions:

```javascript
const observer = new PerformanceObserver((list) => {
  for (const entry of list.getEntries()) {
    if (entry.duration > 200) {
      console.log(entry.name, Math.round(entry.duration), entry.target);
    }
  }
});
observer.observe({ type: "event", buffered: true, durationThreshold: 16 });
```

This logs interactions slower than the 200-millisecond good threshold. In production, send the same data to your analytics and measure in the field: lab numbers do not show what real users experience.

## A short checklist before you ship

Tab through the whole flow with the mouse unplugged: focus order matches the visual order, the indicator is visible and never hidden behind sticky chrome, every accessible name contains its visible text, contrast meets 4.5:1, targets are at least 24 by 24 CSS pixels, and the slowest field interaction stays at or under 200 milliseconds.

References: WCAG 2.2: https://www.w3.org/TR/WCAG22/ ; INP (web.dev): https://web.dev/articles/inp ; Optimize INP (web.dev): https://web.dev/articles/optimize-inp

Gilnex LLC
gilnex.com | +1 (424) 500-0744 | info@gilnex.com
