[Bug 10146] New: Labelability of hidden form inputs unclear

http://www.w3.org/Bugs/Public/show_bug.cgi?id=10146

           Summary: Labelability of hidden form inputs unclear
           Product: HTML WG
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P3
         Component: HTML5 spec (editor: Ian Hickson)
        AssignedTo: ian@hixie.ch
        ReportedBy: erik@mozilla.com
         QAContact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html@w3.org


When labeling a hidden input element in an HTML 5 document, the validator at
http://validator.w3.org/check returns the following error: "The for attribute
of the label element must refer to a form control." Further discussion with the
good folks who maintain the validator
(http://bugzilla.validator.nu/show_bug.cgi?id=755), spilling over into the IRC
exchange excerpted therein, suggests that the intent of the HTML 5 spec is that
type=hidden inputs should not be labelable. This makes sense to me, since the
intent is to pass focus from the label to the labeled element, but I do think
the spec could benefit from some clarification.

In particular, according to
http://www.w3.org/TR/html5/forms.html#the-label-element, one can label any
"labelable form-associated element", one of which is "input". I couldn't find
any exceptions to this, for example at
http://www.w3.org/TR/html5/states-of-the-type-attribute.html#hidden-state.

Perhaps we could add something along the lines of "input (with a type attribute
having a value other than hidden)" to the section at
http://www.w3.org/TR/html5/forms.html#category-label :

Labelable elements
    Denotes elements that can be associated with label elements.
        button input keygen meter output progress select textarea

...and also a note in
http://www.w3.org/TR/html5/states-of-the-type-attribute.html#hidden-state .

Thoughts?

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Tuesday, 13 July 2010 16:51:39 UTC