Accessible Forms: Test a Contact Form Against WCAG 2.2
Information about the article

Author: Dmitry Dugarev
Accessible forms can be filled in by everyone. That includes people who use a screen reader or voice control, and people with limited fine motor skills [1]. They work with the keyboard alone [2]. This page shows what an accessible form is made of and which criteria it has to meet. You can test a real contact form live, then use the guide, code and checklist.
This page covers HTML forms on websites. PDF forms need different techniques, so they are not covered here.
- Every field has a visible label. A placeholder is not enough [3], [4].
- Everything works with the keyboard, and the focus stays visible [2], [5].
- Errors appear as text next to the field and in a list that links to each field [6], [7].
- An automated test finds only some of the errors. A person has to check the rest by hand.
What accessible forms are made of
You use forms every day: contact forms, logins, checkouts. They are how people get in touch, sign up or buy something. Most forms have these parts:
- Labels and input fields: Every field (
<input>,<textarea>) needs a visible text label [3]. In HTML, the simplest way is a<label>element [8]. - Logical grouping: Fields that belong together, such as an address or a set of radio buttons, sit in a
<fieldset>with a<legend>[9]. - Hints and input help: Hint text is connected to its field with
aria-describedby.autocompleteattributes make the form faster to fill in [10]. - Error handling: The form detects errors and describes them in text [6]. It collects them in one list and links each error to its field [7]. If it knows a fix, it suggests one [11].
- Status messages: While the form is sending (
role="status") and once it is done (role="alert"), users get feedback they can see and hear [12].
Here is the HTML for an email field with a label, a hint and an error message:
<label for="email">Email address</label>
<input id="email" name="email" type="email" autocomplete="email"
required aria-describedby="email-hint email-error" aria-invalid="true">
<p id="email-hint">We only reply to this address.</p>
<p id="email-error">Enter an email address that contains an @.</p>
What makes a contact form accessible
An accessible contact form works without a mouse. People who use a keyboard or a screen reader can reach every function. For you, that means:
- Clear labels and structure: Labels, hints, error messages and input fields are correctly linked in the markup [9].
- Full keyboard support: You can reach and use every field, button and link with the keyboard. The tab order is logical [2], [13].
- Reliable focus management: The focus moves in a logical order [13]. It is always visible [5]. When there are errors, I move the focus to the error list or to the first field with an error [7].
- Helpful input support: Fields for known data, such as name or email, have
autocompleteattributes [10]. - Clear announcements: The screen reader announces what each field is for and its state, for example "required" or "invalid". It also announces every status change, for example "Sending…" or "An error occurred" [12], [14].
- New in WCAG 2.2: A login does not require a cognitive test, such as remembering a password or solving a puzzle, unless there is an alternative [15]. This also covers a CAPTCHA on a login form [16]. In multi-step forms, nobody has to enter the same information twice [17].
The screen reader reads out the accessible name of each field. A placeholder does not replace a label [4]. It disappears as soon as someone starts typing [4]. In my audits I often see contact forms that rely on placeholders only. The field looks labeled until the user presses the first key.
If users can only spot a field by its border, the border needs a contrast ratio of 3:1 against the adjacent color [18]. You can check the contrast of field borders in the contrast checker.
On WordPress sites, I often find these problems in forms built with page builders like Elementor or plugins like Contact Form 7. Typical examples are fields with only a placeholder and errors marked only in red. For fixes, see Make Elementor forms accessible and Set up Contact Form 7 for accessibility. I fix issues like these in your existing theme, without a relaunch.
Demo: try an accessible form
This contact form puts every point above into practice. Test it with the keyboard:
- Press
Tabto move through all the fields. - Submit the empty form. The focus jumps to the error summary.
- Turn on a screen reader and listen to what it announces for each field.
This form is a demo for learning. It does not send real messages.
Contact forms and the BFSG: when the law applies
In the EU, the European Accessibility Act (EAA) sets the rules. In Germany, the BFSG (Barrierefreiheitsstärkungsgesetz, Germany's implementation of the EAA) puts them into national law. Among other things, the BFSG covers e-commerce services (§ 1(3) no. 5 BFSG) [19]. This means services that consumers receive after 28 June 2025 [19]. These are websites and apps aimed at concluding a consumer contract (§ 2 no. 26 BFSG) [19].
If your website falls under the law, its forms are in scope too. This applies to forms that lead to a contract, such as a checkout or a registration. The law does not say explicitly whether a plain contact form is covered. Have a lawyer check borderline cases.
Microenterprises that offer services are exempt (§ 3(3) BFSG) [19]. The details are in Exemption for microenterprises. To find out whether the BFSG applies to you, use the BFSG relevance check. For an overview of the law, read the BFSG overview.
An automated test finds only some of the errors. Whether a label clearly describes what goes into the field is a separate criterion: WCAG 2.4.6 [20], [21]. This criterion can only be tested manually, because a tool does not understand what the text means.
The free BFSG check tests 20 of the 55 WCAG criteria automatically, at least in part. The other 35 can only be tested manually, because a tool cannot judge meaning and clarity. In the Basis-Audit, I test all 55 criteria by hand.
Accessible forms guide and checklist
This section is for developers. It shows you how to build and test an accessible form step by step. Two pages cover this:
For every recommendation, I explain the why. I show do's and don'ts from real projects, with concrete code examples. Each recommendation points to the matching WCAG criteria [22] and ARIA patterns [23].
Start with the step-by-step guide to get a solid foundation. Then test your form with the form checklist. Questions about your own form? Book a free 15-minute call.
Frequently asked questions (FAQ)
Does my contact form have to be accessible under the BFSG?
That depends on your website. The BFSG applies to websites aimed at concluding a consumer contract (§ 2 no. 26 BFSG) [19]. If your website is covered, check its forms too. Microenterprises that offer services are exempt (§ 3(3) BFSG) [19]. You can read more in Exemption for microenterprises. Take the first step with the BFSG relevance check. For borderline cases, it is best to ask a lawyer.
Is a placeholder enough as a label for a form field?
No. A placeholder does not replace a label [4]. If a label is missing, browsers fall back to the placeholder for the accessible name only as a last resort [24]. It is only visible while the field is empty [4]. Give every field a visible <label> [3], [8].
How do I make form error messages accessible?
The form has to detect the error and describe it in text [6]. Link the message to its field with aria-describedby. The step-by-step guide shows you the code for the error summary and the focus.
Disclaimer
The content of this article was researched to the best of my knowledge and is for general information only. It is not legal advice and cannot replace individual advice from a lawyer who knows your specific situation.
I cannot guarantee that the information is correct, complete or up to date. Any action you take based on this information is at your own risk.