Skip to main content
DrupalMaze
Free quote

USWDS forms: the accessibility wins you get for free

Every input gets a real label

USWDS form markup pairs usa-label with usa-input via for/id. That sounds obvious, but a surprising share of custom government forms rely on placeholder text — which vanishes on focus and fails 508 outright. Adopting the USWDS pattern makes the failure structurally impossible.

Error states that announce themselves

The error pattern — usa-form-group--error, usa-input--error, usa-error-message — wires aria-describedby to the message and keeps it visible, not just red. Screen reader users hear the error on focus; sighted users see it anchored to the field. Both are required, and both are done for you.

Fieldsets and legends done right

Radio groups and checkbox sets use usa-fieldset with a real legend, so the question is announced once for the group instead of confusingly per-option. It also makes required markers and hints attach to the group semantically.

Hints, masks, and input types

usa-hint text associates via aria-describedby. Combined with proper inputmode and type attributes — tel, email, numeric — the components fix the "tiny keyboard, wrong layout" mobile problem as a side effect.

The part Drupal adds

Drupal's Form API already emits label and error plumbing; the work is mapping its output onto USWDS classes instead of fighting it. Do that once in form-element templates and every form on the site — contact, search, webforms — inherits the accessible pattern. When we audit sites, broken form semantics are the most common 508 finding; this is the cheapest large-scale fix available. Get a quote for an accessibility pass.

Bring us your beautifully complicated problem.

↗