A form is part of a task, not just a set of fields. People need to understand what information is required, how to enter it, and how to recover from a mistake. Clear labels and predictable feedback help people using keyboards, screen readers and small screens.
Use a visible, specific label for every field
Do not rely only on placeholder text that disappears when someone starts typing. Put the label next to its input, describe the expected format when it matters, and mark required fields clearly. Group related questions under a heading and explain why sensitive information is needed.
Help people recover from errors
Show the error near the field and describe how to fix it: “Enter a date as YYYY-MM-DD” is more useful than “Invalid value.” Preserve valid answers when a submission fails. For a long form, provide a summary of errors that links to the affected fields.
Instructions should appear before the mistake is made. If a field expects a reference number with eight digits, say so beside the label and preserve leading zeroes. If the form rejects an entry, identify the specific field, explain the acceptable format and do not clear unrelated answers. Avoid asking users to guess what “invalid” means.
Test without a mouse
- Use Tab and Shift+Tab to reach every control in a sensible order.
- Check that focus is visible and does not disappear behind sticky content.
- Submit an empty form and observe whether errors are explained.
- Try a narrow viewport and zoomed text.
- Ask a user unfamiliar with the form to complete a realistic task.
Use semantic controls and programmatic labels rather than styling alone. The W3C WAI Forms Tutorial provides implementation guidance; automated checks are helpful but do not replace testing with assistive technology and real users.
Reduce unnecessary fields, state what happens after submission, and make privacy expectations easy to find. A form that asks only for needed data is usually easier to complete and easier to maintain.
