Accessible Form Label & Input Checker
Scan web forms and checkout flows for missing <label> tags, unlabelled inputs, and placeholder-only anti-patterns to ensure full WCAG conformance.
How Accessible Form Labelling Works โ And How This Checker Verifies It
1. What This Tool Actually Does
The checker parses the raw HTML of a page (fetched live or pasted directly) and extracts every <input>, <select>, and <textarea> element, excluding hidden, submit, button, image, and reset inputs which don't need a visible label. For each remaining control it checks, in order: does an <label for="id"> exist whose for attribute matches the control's id? Does the control carry aria-label or aria-labelledby? If both are absent but a placeholder is present, it's flagged as the placeholder-as-label anti-pattern rather than a total failure.
Every control is also checked for an autocomplete attribute, and the results are compiled into a 0โ100 accessibility score: 25 points are deducted per fully unlabelled control, 12 points per placeholder-only control, giving you a quick, sortable severity signal before you open the detailed inventory below the scorecard.
2. How to Use It
- Choose "Scan Form URL" for a live page (checkout, contact page, signup) or "Paste Form HTML" if the form is behind a login wall or rendered client-side.
- Submit the form and review the Form Accessibility Score at the top โ 90+ indicates fully labelled forms, below 70 flags meaningful accessibility debt.
- Open the Form Input Inventory to see every detected control individually, each tagged Accessible or Unlabelled with its resolved label text shown where available.
- For any red-flagged control, read the specific issue text โ it distinguishes a placeholder-only anti-pattern from a completely unlabelled field, since the fixes differ.
- Re-run the scan after each fix to confirm the score climbs and the flagged control moves into the Accessible column.
3. The Underlying WCAG Criteria
- 1.3.1 Info and Relationships โ Level A: Form labels must be programmatically determinable, not just visually adjacent. A
<label>sitting next to an input with nofor/idpairing looks correct visually but conveys nothing to assistive technology. - 3.3.2 Labels or Instructions โ Level A: When content requires user input, labels or instructions must be provided so the user understands what data is expected.
- 4.1.2 Name, Role, Value โ Level A: Every form control must expose an accessible name via the accessibility tree โ the actual mechanism a screen reader queries, which an unlabelled or placeholder-only field fails to provide correctly.
- 1.3.5 Identify Input Purpose โ Level AA: Inputs collecting common personal data (name, email, address, payment details) should declare a standard
autocompletetoken so browsers and assistive tools can autofill or announce the field's real-world purpose.
4. A Worked Example
Paste this snippet into the "Paste Form HTML" tab: <input type="email" placeholder="Email address" />. Because there is no id, no matching <label for>, and no aria-label, the parser marks hasExplicitLabel and hasAriaLabel as false. Since a placeholder attribute is present, it's classified as hasPlaceholderOnly: true rather than a hard failure, and the report surfaces the exact anti-pattern warning: "Uses placeholder text as the only label. Placeholders disappear when typing and are not persistent."
Now change it to: <label for="em">Email address</label><input type="email" id="em" placeholder="you@company.com" />. The regex-based label lookup finds the matching for="em" / id="em" pair, resolves the label text to "Email address", and the control moves into the Accessible column โ the placeholder is now acceptable because it supplements, rather than replaces, a real label.
5. Who Actually Uses This Tool
- Agencies auditing e-commerce checkout flows: checkout forms are the single highest-conversion-risk area of a site, and unlabelled fields there are both an accessibility and revenue problem.
- WordPress developers using Contact Form 7, WPForms, or Gravity Forms: many drag-and-drop builders generate placeholder-driven markup by default; this tool catches it before the form ships.
- QA teams doing pre-launch regression checks: re-run the scan on staging URLs after every form redesign to catch labelling regressions before production deploy.
- Government and education portals: application, enrollment, and benefits forms are frequent Section 508 audit targets, and label association is one of the most commonly cited violations.
6. Common Mistakes & Limitations
- Client-side-rendered forms: the URL scanner reads server-delivered HTML only; forms injected after JavaScript hydration require the "Paste HTML" mode with markup copied from DevTools.
- Wrapping instead of pairing: a
<label>that wraps an input (implicit labelling) without an explicitfor/idpair may not be reliably detected by this regex-based parser โ explicit pairing is the more robust and recommended pattern anyway. - Visual-only labels: the tool cannot detect a label that's visually styled to look disconnected (e.g. positioned far from its input via CSS) even if the underlying markup is technically correct โ always test with an actual screen reader too.
- Autocomplete token correctness: the checker only confirms an
autocompleteattribute exists, not that its value is a valid WHATWG token (e.g.autocomplete="email"vs. a typo'd value) โ cross-check against the HTML autofill spec for critical checkout fields.
Frequently Asked Questions
Why is using placeholder text as a label considered an accessibility anti-pattern?
Placeholder text vanishes as soon as the user begins typing, leaving users with memory or cognitive impairments unable to verify what the field asked for. Furthermore, placeholders have low contrast by default and are skipped by many screen readers.
What is the correct way to label a form field in HTML5?
Use an explicit <label for="field-id">Label Text</label> paired with an <input id="field-id">. Clicking an explicit label also expands the click hit-target area for motor-impaired users.
What is WCAG 2.1 SC 1.3.5 (Identify Input Purpose)?
For fields collecting personal user information (name, email, credit card, address), browsers must support autofill through standard autocomplete attributes (e.g. autocomplete="email") to reduce repetitive typing.
Does this tool enforce SSRF protection?
Yes. All live audits enforce strict SSRF safeguards, blocking requests to private networks, loopbacks, and cloud metadata IPs.
How does this checker decide an input is accessibly labelled?
It looks for one of two programmatic name sources: a <label for="id"> element whose "for" attribute matches the input's id, or an aria-label / aria-labelledby attribute directly on the control. If neither is present, the input is flagged as unlabelled regardless of any visible placeholder text.
Can this tool audit forms rendered entirely by JavaScript?
The URL scan mode fetches raw server-rendered HTML, so form markup injected client-side after hydration (common in some React/Vue checkout widgets) may not appear in the audit. For those cases, use "Paste Form HTML" with the rendered DOM markup copied from your browser's Elements panel.
What is WCAG 4.1.2 (Name, Role, Value) and how does it relate to form labels?
SC 4.1.2 requires that every UI component expose a programmatically determinable name, role, and state to assistive technology. An unlabelled input has a role (textbox) and a state, but no accessible name โ so it fails 4.1.2 even before considering 3.3.2 (Labels or Instructions).
Why does the score drop more for missing labels than for placeholder-only fields?
A completely unlabelled field is a total blocker โ screen reader users get no information at all about the field's purpose. A placeholder-only field at least announces something (often the placeholder text itself, depending on the assistive technology), so it is scored as a less severe, still-serious anti-pattern.
