Re: use cases for <label>

On Sat, Jul 6, 2013 at 1:04 AM, Steve Faulkner <faulkner.steve@gmail.com>wrote:

> Hi all,
>
> are there any uses cases for the <label> element[1] that does not label a
> control?
>
> example:
>
> <label>name</label> <input type="text">
>
> in the case above the label element is not associated with the input using
> for/id or via wrapping.
>
> It does not appear to do anything, so why should it be conforming?  would
> it be helpful to authors/users if this was flagged as an error
>
> I have a use case for use of an additional secondary label associated
> using aria-describedby:
>
>  primary label = accessible name, auxiliary label = accessible description
>
>
> <p><label>name <input type"text" aria-describedby="instructions"></label></p>
>
>
> <p><label id="instructions">last name only please</label></p>
>
>
> https://gist.github.com/stevefaulkner/5935190
>
> is the above a reasonable use case?
>
> [1]
> http://www.w3.org/html/wg/drafts/html/master/forms.html#the-label-element
> --
>
>
"label" is quite universal term and it make sense I think to keep it in
generic form.
Label is an entity that labels/describes meaning of some other element.

We do not have currently any element that can be used as a label/caption
universally.

For example I would like to give caption to some <canvas> element. What
element can I use now for that?

As for me this:

<div .graph>
  <label>sin(x)/x graph:<label>
  <canvas />
</div>

looks as the only option for now. Any other labeling things like  <legend>,
<caption> and <figcaption> (what an ugly name someone invented...)
are simply not valid in given context. I don't think anyone will be happy
to see new <cancaption> or the like.

So please, keep that <label> simple and universal.

-- 
Andrew Fedoniouk.

http://terrainformatica.com

Received on Monday, 8 July 2013 04:17:18 UTC