This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 23173 - Scope <label> association to the home subtree rather than to the document, to find controls in e.g. a template (document fragment)
Summary: Scope <label> association to the home subtree rather than to the document, to...
Status: RESOLVED WORKSFORME
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-06 12:54 UTC by contributor
Modified: 2013-11-12 00:08 UTC (History)
3 users (show)

See Also:


Attachments

Description contributor 2013-09-06 12:54:24 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html
Multipage: http://www.whatwg.org/C#attr-label-for
Complete: http://www.whatwg.org/c#attr-label-for
Referrer: http://www.whatwg.org/specs/web-apps/current-work/multipage/

Comment:
Allow association within home subtree rather than only in document, to find
the control in e.g. a template (document fragment)

Posted from: 90.230.218.37
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36 OPR/16.0.1196.55 (Edition Next)
Comment 1 Ian 'Hixie' Hickson 2013-09-09 21:43:10 UTC
Hmm, interesting idea. What do browsers do?
Comment 2 Simon Pieters 2013-09-09 22:27:43 UTC
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2514

Looks like Presto/Blink/Gecko already do what this bug suggests. (Haven't checked IE.)
Comment 3 Ian 'Hixie' Hickson 2013-09-13 22:40:34 UTC
This seems to only work for containership, not ID assignment:

   http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2523

Interestingly, the for="" thing seems to work even when the control is in the document but the label isn't:

   http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2522

What do we want to spec?
Comment 4 Simon Pieters 2013-09-14 20:33:47 UTC
Ah. 2522 doesn't work in Gecko though.

I don't know if it's annoying to implement the id lookup outside the document.

So I think we should either do what I suggested in comment 0 or keep the spec as is. What browsers do now is inconsistent.
Comment 5 Ian 'Hixie' Hickson 2013-09-16 17:54:34 UTC
I agree that those are reasonable alternatives. I don't know which one to go with. In the interests of minimising churn, I'm biased towards the current text.

We should probably file bugs on the browsers to see if they'll change...
Comment 6 Ian 'Hixie' Hickson 2013-11-12 00:08:58 UTC
I'm going with leaving the spec as-is. It matches some browsers, and minimises churn. It's not obvious that any other text is significantly better enough to justify changing the spec.