W3C home > Mailing lists > Public > www-validator@w3.org > September 2015

Re: Error?

From: Steve Faulkner <faulkner.steve@gmail.com>
Date: Thu, 10 Sep 2015 23:42:04 +0200
Message-ID: <CA+ri+Vm6Hkxb4n6vrewEK2XpJ5177Eu+t5rba1MFiZ-rWp0PiQ@mail.gmail.com>
To: "Jens R. Rasmussen" <jens.r.rasmussen20@gmail.com>
Cc: "www-validator@w3.org" <www-validator@w3.org>
Hi Jens,

The label element can only be associated with 'labelable elements'. and
will only work correctly when associated with these elements
http://www.w3.org/TR/html5/forms.html#category-label

The list of labelable includes does not include <a>

--

Regards

SteveF
Current Standards Work @W3C
<http://www.paciellogroup.com/blog/2015/03/current-standards-work-at-w3c/>

On 10 September 2015 at 12:04, Jens R. Rasmussen <
jens.r.rasmussen20@gmail.com> wrote:

> I'm got an error message for using the label together with an <a>
>
> <tr>
>       <td><label for='glemt'>&nbsp;&nbsp;&nbsp;Jeg kan ikke huske mine
> log-indata.</label></td>
>       <td><a id='glemt' href='glemtpassword.asp'>Tryk her for
> hjælp</a>!</td>
> </tr>
>
> The error message says
>
>    1.
>
>    *Error*: The for attribute of the label element must refer to a
>    non-hidden form control.
>
>    From line 71, column 17; to line 71, column 35
>
>    <td>*<label for='glemt'>*&nbsp;
>
>
> But isn't it correct syntax I have used?
>
> best regards
>
> Jens
>
> Jens.R.rasmussen@tvegaard.dk
>
Received on Thursday, 10 September 2015 21:43:10 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:18:13 UTC