Accessible forms: labels, errors and keyboard access before visual effects

A form is understandable when someone knows what to enter, how to correct an error and whether submission succeeded. Labels, keyboard operation and messages are part of its functionality, even if the form has only a few fields.

Original editorial diagram 01 / QUESTION 02 / EVIDENCE 03 / DECISION
↗ Original conceptual diagram Not a product screenshot
In this guide ⌄

A practical evaluation is to fill it in, deliberately make a mistake, correct it and check the result. That tells us more than looking only at an empty form.

Where a readable form begins

Every control needs an understandable name associated with its field. The W3C labelling tutorial explains associations using label , for and id . A placeholder can provide an example, but it does not replace a visible description of the information requested.

A “Degree programme” field might show “Computer Engineering, undergraduate” as an example. Once someone starts typing, they should still know which field they are completing.

Element User's question Proposed check
Label What information should I enter? A visible, associated name
Instruction In which format? An example or constraint before an error
Outcome Was my request received? An understandable, verified status

A small example with a clear boundary

DEMONSTRATION LAB

Demonstration form for requesting study materials

The lab form contains subject, email and message fields. It uses native HTML controls, associated labels and a button labelled “Send request”.

The lab can simulate acceptance, a server error and a connection problem without sending email. In both error cases, it retains the text already entered.

Simulation tests the interface. It does not demonstrate delivery of a message to a real mailbox.

This distinction prevents a common mistake: displaying success merely because a button was pressed. A confirmation should correspond to a state the system actually knows, such as “request accepted by the server”. Reading by the recipient is a further event.

Errors should explain how to recover

The W3C notification tutorial describes identifying problems and communicating them. For a project, I would propose specific messages: “Enter an email address in the format name@example.org” helps more than “Invalid data”.

Colour can reinforce the message, but the text should remain understandable without distinguishing red. Instructions connected to a field can use aria-describedby ; a dynamic notification can use an appropriate status region. Test behaviour with assistive technology rather than inferring success from the presence of ARIA attributes alone.

An error concerns the data or operation. Its message should help someone correct the problem without forcing them to fill in the entire form again.

Browser validation does not replace server validation. The former can help with completion; the latter must also check requests arriving without the intended interface.

Testing the form in six steps

  1. 1

    Open the form at a mobile width and read the labels, examples and button before entering anything.

  2. 2

    Use Tab and Shift+Tab: the path should follow an understandable order.

  3. 3

    Check that focus is visible and cannot become trapped.

  4. 4

    Submit empty fields and an invalid email address.

  5. 5

    Simulate a server error and an interrupted connection.

  6. 6

    Check labels and notifications with a screen reader, recording the operating system and browser used.

An automated tool can find some problems. It does not replace completing the form or, by itself, demonstrate conformance of the whole page. Wording also needs checking: a field correctly associated with “Data 2” may still be incomprehensible.

What to check before publishing

CHECKLIST

Check your project

0/6

Requesting less data can simplify the process and limit the information that needs managing. An optional name, necessary contact details and a free-text request may suffice for an initial conversation; justify extra fields according to their function.

For a professional form with Row Tech, the work starts with what someone needs to do and what happens after submission. Design supports that path rather than replacing it.

Download the lab

Download the demonstration lab (ZIP) . Open the HTML file in a browser. Outcomes are simulated: no email is sent and no data is saved. Screen-reader testing remains to be completed.

Sources and scope

Antonio Ferone

Written by

Antonio Ferone

Personal projects, technical explanations and learning experiences.

Author profile ↗

THE NEXT STEP

Apply the method to your project

For a professional project, discuss sources, constraints and responsibilities with the Row Tech team.

Talk to Row Tech ↗

Frequently asked questions

The questions that matter

Can a placeholder be the only label?

It is not a good substitute: it disappears during entry and does not provide the same persistent visible reference.

Is making the invalid field red enough?

No. Provide an understandable message identifying the problem and, where possible, how to correct it.

Can I use only custom controls?

Native controls provide useful behaviours. A custom component requires additional checks on keyboard interaction, name and state.

Do ARIA attributes guarantee accessibility?

No. They must describe correct behaviour and be verified in the real interface.

When should entered text be cleared?

After a confirmation consistent with the service's contract. Keeping it after an error avoids lost work.

Does the lab really send the request?

No. It simulates outcomes so the interface can be tested without contacting anyone.

Continue reading

Projects and technical notes

Explore projects ↗

Explore related content

Find articles, projects and resources on the same themes.