Accessible Web Forms: A Practical Checklist

AP
Aisha Patel
·7 min read
Accessible Web Forms: A Practical Checklist

Why Form Accessibility Matters

Forms are the primary way users interact with web applications. An inaccessible form doesn't just fail WCAG compliance — it actively prevents people from using your product.

The Essential Checklist

Labels and Instructions

Every input needs an associated label. Not a placeholder — a real <label>:

html
<label for="email">
  Email address <span aria-hidden="true">*</span>
</label>
<input id="email" type="email" required aria-required="true" />

Warning

Never use placeholder text as the only label. Placeholders disappear when users type, leaving them without context.

Error Handling

Errors must be programmatically associated with their fields:

html
<input
  id="email"
  type="email"
  aria-invalid="true"
  aria-describedby="email-error"
/>
<p id="email-error" role="alert">
  Please enter a valid email address.
</p>

Keyboard Navigation

Every form element must be reachable via Tab key. Custom components need explicit tabindex and keyboard event handlers.

Focus Management

After form submission: - On success: move focus to the success message - On error: move focus to the first invalid field

tsx
function handleSubmit() {
  const firstError = document.querySelector('[aria-invalid="true"]')
  if (firstError instanceof HTMLElement) {
    firstError.focus()
  }
}

Testing with Screen Readers

Use VoiceOver (Mac) or NVDA (Windows) to test your forms. Listen for: - Field labels being announced - Required state being communicated - Error messages being read automatically - Form submission feedback

AP
Aisha Patel

editor

UX engineer and accessibility advocate. Specializes in design systems, inclusive design, and CSS architecture. Speaker at multiple web conferences.

Comments (2)

CN
Chris Nguyen

This should be required reading for every frontend developer. The focus management section alone saved me hours of debugging.

LM
Laura Martinez

I'm a QA engineer and this checklist is now part of our testing protocol. Thank you for making this so actionable!

Related Posts

CSS Container Queries: The Layout Revolution
design6 min

CSS Container Queries: The Layout Revolution

Container queries let components adapt to their container's size instead of the viewport. Here's how to use them in production today.

AP
Aisha Patel·
2,340