By definition, the for
attribute value must match the id
attribute value of “another” form control, to use the HTML 4.01 terminology. Controls are created by input
, textarea
, button
, select
, or object
elements, so just read “another” as “a”. HTML5 puts this somewhat differently, specifying that the attribute must refer to a labelable element.
From the error message, it seems that you are validating against HTML5, so the rule that applies is that the for
attribute must refer to a button
, input
(other than with type=hidden
), keygen
, meter
, output
, progress
, select
, or textarea
element. My guess is that you just forgot the id
attribute, incorrectly assuming that the name
attribute could do its job.