What This Implies
This error is saying you that a
<label> within a
<form> uses a
for attribute inaccurately.
for attribute of a
<label> is employed to associate a label with appointed form input. It should comprise the
id of the input to which it is associated. Leaving the
for attibute blank or referring to an input that does not subsist is not approved.
The label for attribute should comprise the input id value
To throw away the for and id attributes all-together, place input inside label
Foo: <input name="foo">
Further note, that input cannot be hidden
<input type="hidden">, but it can be styled as hidden
In case you employ the for attribute in a label element it has to match the id of an input element in your form.
<label for="field-id" style="line-height:24px;">Your Name</label><br>
<input type="text" id="field-id">
By definition, the
for attribute value should match the
id attribute value of “another” form control, to employ the HTML 4.01 terminology. Controls are made by
object elements, hence only read “another” as “a”. HTML5 puts this somewhat diversely, secluding that the attribute should refer to a labelable element.
From the error message, it appears that you are validating against HTML5, hence the rule that executes is that the
for attribute should refer to a
input (other than with
textarea element. My guess is that you only forgot the
id attribute, inaccurately pretending that the
name attribute could do its job.