Accessibility

Building Accessible Forms in WordPress

Building Accessible Forms in WordPress

Forms are where websites ask people to do something: contact you, book an appointment, sign up, check out. They’re also where accessibility problems do the most damage. An inaccessible paragraph is frustrating. An inaccessible form means someone can’t become your customer at all.

I regularly audit WordPress forms that look fine at a glance but fail real users. Placeholder text used instead of labels. Error messages shown only in red. Custom dropdowns that can’t be used with a keyboard. CAPTCHAs that block screen reader users completely. Submit buttons that give no feedback.

The good news is that accessible forms are mostly about following a few clear principles, and most WordPress form plugins can produce them if configured well. Here’s what to get right.

Why form accessibility matters

People use forms in many different ways:

  • Screen reader users hear form fields announced rather than seeing them.
  • Keyboard users move between fields with the Tab key.
  • People with low vision may use zoom or high contrast settings.
  • People with cognitive disabilities benefit from clear instructions and forgiving error handling.
  • People with motor impairments may use voice control or switch devices.

An accessible form works for all of them, and it usually works better for everyone else too. Clear labels, helpful errors and simple layouts reduce abandonment across the board.

Accessibility is also increasingly a legal requirement in many places, with the Web Content Accessibility Guidelines, WCAG, as the common reference. The current version, WCAG 2.2, includes several criteria specifically about forms.

Every field needs a proper label

This is the single most important rule. Each form field must have a label that’s:

  • Visible, so everyone can see what the field is for.
  • Programmatically associated with the field, so screen readers announce it when the field receives focus.

In HTML, this means a label element connected to the input with matching for and id attributes:

Placeholder text isn’t a label

Many modern designs use placeholder text inside fields instead of labels. It looks clean, but it causes problems:

  • The placeholder disappears when someone starts typing, so they forget what the field was for.
  • Placeholder text is often low contrast and hard to read.
  • Some screen readers don’t announce placeholders reliably.

Use visible labels above or beside fields. If you use placeholders at all, use them for examples, like a date format, not as the only label.

Check your form plugin’s settings

Most WordPress form plugins generate labels correctly by default. Problems appear when label display is turned off for design reasons, or when custom HTML forms are built without labels. If a plugin offers an option to hide labels, choose a “screen reader only” option rather than removing them entirely, and prefer visible labels whenever possible.

Group related fields

When several fields belong together, like radio buttons for a single question or the parts of an address, group them with a fieldset and a legend:

Screen readers announce the legend along with each option, so users understand the question they’re answering.

Give clear instructions

Tell people what you need before they make mistakes:

  • Indicate required fields clearly, with text like “Required” or an asterisk explained at the top of the form. Don’t rely on colour alone.
  • Explain format requirements, like password rules or date formats, before the field, not only after an error.
  • Connect instructions to fields with aria-describedby, so screen readers read them when the field is focused.

Make error messages helpful and accessible

Error handling is where many forms fail.

Say what went wrong and how to fix it

“Invalid input” doesn’t help. “Enter an email address in the format [email protected]” does.

Don’t rely on colour alone

A red border isn’t enough. People with colour blindness may not notice it, and screen readers don’t announce colour. Include text describing the error.

Connect errors to fields

Associate each error message with its field using aria-describedby, and mark invalid fields with aria-invalid=”true”, so screen readers announce the problem when the user returns to the field.

Announce errors

After a failed submission, move focus to an error summary at the top of the form, or make sure errors are announced through a live region. Otherwise screen reader users may not realise the form wasn’t submitted.

An error summary listing each problem, with links that move focus to the relevant field, works well for longer forms.

Keep what users entered

Never clear valid entries when a form fails validation. Retyping everything is frustrating for everyone and exhausting for some users.

Support keyboard users

Everyone should be able to complete the form using only a keyboard:

  • Tab should move through fields in a logical order.
  • Focus should be clearly visible on every field and button.
  • Custom controls, like styled dropdowns, date pickers and toggles, must work with the keyboard.
  • Nothing should trap focus.

Test this yourself: put your mouse aside and complete your form using Tab, Shift+Tab, arrow keys, Space and Enter.

Visible focus styles

Many themes remove the default focus outline because designers consider it ugly. That makes forms almost unusable for keyboard users. Keep focus styles, or replace them with clear custom styles that have good contrast. WCAG 2.2 strengthened requirements around focus visibility and making sure focused elements aren’t hidden behind sticky headers or banners.

Use native controls where possible

Native HTML form controls, like standard select menus, checkboxes and date inputs, come with built-in accessibility. Custom-built controls that replace them often break keyboard and screen reader support unless they’re built very carefully.

If your form plugin or theme replaces native controls with fancy custom versions, test them thoroughly or switch back to native controls.

Use autocomplete attributes

The autocomplete attribute tells browsers what kind of information a field expects, such as name, email, tel, street-address or postal-code. Browsers can then fill in saved details, which helps everyone and especially people with motor or cognitive disabilities. WCAG requires identifying the purpose of fields that collect personal information.

Many form plugins let you set autocomplete values per field. It’s a small setting with a big impact.

Rethink CAPTCHAs

Traditional CAPTCHAs that ask users to read distorted text or identify objects in images are a major barrier for people with visual, cognitive and motor disabilities. Audio alternatives are often difficult too.

WCAG 2.2 introduced a criterion around accessible authentication, discouraging cognitive tests like puzzles unless alternatives are available.

Better approaches to spam protection include:

  • Honeypot fields that are invisible to users but filled in by bots.
  • Time-based checks that reject submissions completed impossibly quickly.
  • Invisible challenge services that assess risk without asking users to solve puzzles.
  • Server-side spam filtering.

These stop most spam without putting barriers in front of real people.

Avoid making people repeat themselves

WCAG 2.2 also includes a criterion about redundant entry: if a user has already provided information in a process, don’t make them enter it again unless necessary. For example, offer a “same as billing address” option for shipping addresses in checkout forms.

Keep forms simple

Accessibility and usability overlap strongly here:

  • Ask only for what you need.
  • Use one column layouts, which are easier to follow, zoom and navigate.
  • Break long forms into logical steps, with clear progress indicators.
  • Use plain language in labels and instructions.
  • Make buttons clearly labelled, like “Send message” rather than “Submit”.

Confirm success clearly

After submission, tell people clearly that it worked. Show a success message that’s announced to screen readers, or redirect to a confirmation page with a clear heading. Explain what happens next. Uncertainty about whether a form was submitted leads to duplicate submissions and anxious follow-up emails.

Test your forms

Automated tools catch some issues, like missing labels and low contrast, but not all. Combine:

  • Automated checks with browser extensions or accessibility testing tools.
  • Keyboard testing, completing every form without a mouse.
  • Screen reader testing, using free screen readers like NVDA on Windows or VoiceOver on Mac and iPhone.
  • Zoom testing, at 200 percent and higher.
  • Error testing, deliberately submitting incomplete or invalid data.

Frequently asked questions

Are WordPress form plugins accessible?

Many popular form plugins produce accessible markup by default, but settings and theme styles can undermine it. Test your actual forms rather than assuming.

Is it okay to hide labels for a cleaner design?

Visible labels are best. If you must hide them visually, use a screen-reader-only technique so they’re still available to assistive technology, but understand that sighted users lose context.

What’s wrong with CAPTCHAs?

Visual and puzzle-based CAPTCHAs create serious barriers for many disabled users. Honeypots and invisible checks protect against spam without excluding people.

How do I test with a screen reader?

Install a free screen reader such as NVDA, or use VoiceOver built into Apple devices. Navigate your form with the keyboard and listen to how fields, instructions and errors are announced.

Final thoughts

Accessible forms are clear, forgiving and usable by everyone. Give every field a visible, connected label, group related fields, explain requirements upfront, make errors specific and announced, support keyboard users with visible focus, use autocomplete, avoid puzzle CAPTCHAs and confirm success clearly. Test with a keyboard and a screen reader. Every improvement means more people can contact you, buy from you and sign up, which is exactly what your forms are for.