What this check tests
The audit counts every <form> in the HTML of every page it crawled (the homepage plus up to nine more). For each form it looks at every <input>, <select> and <textarea>, skipping inputs of type hidden or submit. A form is well structured only when every one of those fields passes both tests:
- It has a non-empty
nameattribute. - It has a label. That means a
<label for>whose value equals the field'sid, or, only when the field has noid, an enclosing<label>; or anaria-labeloraria-labelledbyattribute.
The score is the share of well-structured forms, rounded:
| Result | When |
|---|---|
| Pass | 80 or more |
| Partial | 1 to 79 |
| Fail | 0 |
| Skip | No form on any crawled page. The message says not applicable |
Details that decide outcomes:
- A field with an
idthat sits inside a wrapping<label>but has no matchingforis not counted as labeled, even though browsers treat that as a valid association. placeholderandtitledo not count as labels.type="button",resetandimageinputs are checked like text fields, so an<input type="reset">without a name fails its form.<button>elements are not inputs and are ignored.- Forms added by JavaScript after load are not seen, because the audit reads the HTML it fetched.
Why it matters to agents
Google's web.dev guide for agent-friendly sites says to add the for attribute on <label> tags to link them to inputs, because it helps the agent understand the purpose of a field. It describes agents reading the page through screenshots, the HTML and the accessibility tree, and recommends semantic HTML. The W3C and MDN guidance on labels is written for accessibility, and the same markup serves both audiences.
Names matter for a second reason. In Chrome's WebMCP documentation, the example form shows each field's name becoming a property of the tool's input schema, and the field's label supplying its description when no toolparamdescription is set. That API is experimental; see WebMCP declarative.
None of these sources says that labelled forms raise visibility in any assistant. The payoff is that an agent can complete a task on your site, such as a search, booking or contact request.
How to fix it
- List the forms the audit counted. A site-wide search box in the header counts on every page, so one unlabeled search field can fail most of your forms.
- Give each field a
name, and a visible<label>tied to it:
<form action="/search">
<label for="q">Search the docs</label>
<input type="search" id="q" name="q">
<button type="submit">Search</button>
</form>
- Where a visible label does not fit the design, use
aria-label, or a visually hidden<label>; W3C WAI shows both. - If a field has an
idand sits inside a wrapping<label>, add theforattribute too. It is valid and the audit then counts it. - Use
<button>elements for buttons, since the audit ignores them. If you keep<input type="reset">ortype="button", give it anameand a label.
If you have no forms, the skip is correct and nothing needs adding. For exposing a form as an explicit tool, see WebMCP declarative; for markup that describes actions without a form, see action schemas.