Forms are where most websites lose people who use screen readers, keyboards or zoom. The good news is that the fixes are small and they help everyone.

Every field needs a real label

Placeholder text disappears as soon as someone types and is often too faint to read. Use a visible <label> tied to the input with for/id. If a design really has no room, the label can be visually hidden, but it must exist.

Say what went wrong, next to the field

"Invalid input" at the top of the page doesn't help. Put the message beside the field, say how to fix it ("Use the format 0712 345 678"), and connect it with aria-describedby so screen readers announce it. Mark the field with aria-invalid="true".

Keep focus where people expect it

  • After a failed submit, move focus to the first field with an error.
  • Never remove the focus outline without replacing it with something just as visible.
  • Make sure the whole form works with Tab, Shift+Tab, Space and Enter.

Contrast and size

WCAG AA asks for 4.5:1 contrast for text and 3:1 for input borders. Light grey borders on white often fail. Tap targets should be around 44px so fields and buttons are easy to hit on a phone.

Ask for less

The most accessible field is the one you don't include. Every extra question is another chance to give up. If you don't need a phone number, don't ask for it.