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 13553 - 4.10.6 confusing, seemlingly contradictory text
Summary: 4.10.6 confusing, seemlingly contradictory text
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML5 spec (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 editorial
Target Milestone: ---
Assignee: steve faulkner
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords: a11y, a11ytf
Depends on:
Blocks:
 
Reported: 2011-08-03 01:39 UTC by Cynthia Shelly
Modified: 2016-03-09 14:22 UTC (History)
11 users (show)

See Also:


Attachments

Description Cynthia Shelly 2011-08-03 01:39:20 UTC
The label element's exact default presentation and behavior, in particular what its behavior might be, if anything, should match the platform's label behavior. The activation behavior of a label element for events targetted at interactive content descendants of a label element, and any descendants of those interactive content descendants, must be to do nothing.

The second sentence here seems to contradict the first and the following example.  This text is in the editor's draft.  The second sentence does not appear in the last call draft, and the meaning is more clear without it.
Comment 1 Michael[tm] Smith 2011-08-04 05:03:07 UTC
mass-moved component to LC1
Comment 2 Ian 'Hixie' Hickson 2011-08-10 22:10:08 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Change Description: no spec change
Rationale: The sentence is question is required to make sure that if you click on a text field inside a <label> whose labeled control is another text field, you don't end up focusing the other text field (which would be rather confusing to users).
Comment 3 Ian 'Hixie' Hickson 2011-08-10 23:04:30 UTC
(The sentence in question was added in r6187.)
Comment 4 Cynthia Shelly 2014-02-10 23:43:33 UTC
The text is still there, and is still confusing.  In the example, the following markup is used
<label><input type=checkbox name=lost> Lost</label>

The <input> is a child of the <label>.  The text in the example says that the input would be activated or focused, depending on platform convention.  <input> is an interactive element, so this contradicts the sentence in the paragraph above.

Suggest re-wording to:
The label element's exact default presentation and behavior, in particular what its activation behavior might be, if anything, should match the platform's label behavior. The activation behavior of a label element for events targeted at <del>interactive content</del><ins>hyperlink</ins> descendants of a label element, and any descendants of those <del>interactive content</del><ins>hyperlink</ins> descendants, must be to do nothing.
Comment 5 steve faulkner 2014-02-11 11:56:13 UTC
(In reply to Cynthia Shelly from comment #4)
> The text is still there, and is still confusing.  In the example, the
> following markup is used
> <label><input type=checkbox name=lost> Lost</label>
> 
> The <input> is a child of the <label>.  The text in the example says that
> the input would be activated or focused, depending on platform convention. 
> <input> is an interactive element, so this contradicts the sentence in the
> paragraph above.
> 
> Suggest re-wording to:
> The label element's exact default presentation and behavior, in particular
> what its activation behavior might be, if anything, should match the
> platform's label behavior. The activation behavior of a label element for
> events targeted at <del>interactive content</del><ins>hyperlink</ins>
> descendants of a label element, and any descendants of those
> <del>interactive content</del><ins>hyperlink</ins> descendants, must be to
> do nothing.

Upon re-reading it does appear confusing, as you point out. 
How does replacing "interactive content" with "hyperlink" make it any clearer? 

I am inclined to agree that the meaning is clearer without the second sentence and either remove the second sentence or be more prescriptive about expected behaviour when a label contains mulitiple controls.

<label><input type="text"> <input type="text"> test</label>

note in the example above clicking on the label causes focus to be placed on the first input in browser i tested (in firefox/IE/chrome on windows)
Comment 6 steve faulkner 2014-02-11 12:23:24 UTC
So re-reading again - the preceding sentence to the one quoted states:
"If the for attribute is not specified, but the label element has a labelable element descendant, then the first such descendant in tree order is the label element's labeled control."
http://www.w3.org/html/wg/drafts/html/master/forms.html#the-label-element

which covers the test case I put in the previous comment.

the intent of the second sentence  is to cover this case (i believe)


<label>Lost <input type=text name=lost id="lost"> </label>

<label for="lost">found <input type=text name=found id="found"> </label>

See Ian's Comment 2 "The sentence is question is required to make sure that if you click on a text field inside a <label> whose labeled control is another text field, you don't end up focusing the other text field (which would be rather confusing to users)."

from testing FF/IE/Chrome on windows 8, the behaviour is consistent, clicking on the second label focuses the first control, which appears contrary to what the spec is trying to stop.

what appears to be the case for the browsers tested is that for/id labelling overrides nested control labeling.
Comment 7 steve faulkner 2014-02-11 12:30:52 UTC
Cynthia, 

I think this tweak makes the sentence actually mean what its is supposed to

"The activation behavior of a label element for events targeted at interactive content descendants of <del>a</del> <ins>another</ins> label element, and any descendants of those interactive content descendants, must be to do nothing."

what do you think?
Comment 8 Robin Berjon 2014-02-11 15:22:46 UTC
(In reply to steve faulkner from comment #7)
> Cynthia, 
> 
> I think this tweak makes the sentence actually mean what its is supposed to
> 
> "The activation behavior of a label element for events targeted at
> interactive content descendants of <del>a</del> <ins>another</ins> label
> element, and any descendants of those interactive content descendants, must
> be to do nothing."
> 
> what do you think?

I'm sorry but I don't see what is unclear with the initial wording. Also, the change you make seems to me problematic. You can't say "another" because it may be the same label. Consider:

<label>
  <input>
  <input>
</label>

The label's control is the first input. But if you click inside the second one you really don't want your focus to move to the first one.

Note also that this constraint isn't contradictory with the should match platform behaviour. If there is a platform that has this sort of crazy focus jumping behaviour, there's plenty of good reason to override it there.

I would suggest this be closed.
Comment 9 steve faulkner 2014-02-11 19:48:27 UTC
(In reply to Robin Berjon from comment #8)

> I'm sorry but I don't see what is unclear with the initial wording. 

OK so just to make sure common people like me can understand the scratchings:
what I think it is saying after re re re reading is

If a user clicks on a control that is inside a label do not trigger the labels activation behaviour. Only trigger the label activation behaviour for that part of the labels area that does not contain a control.

??

if this is not correct can you provide an explanation?
Comment 10 Cynthia Shelly 2014-05-22 15:43:07 UTC
I like Steve's plain language description.  Can we use that?
Comment 11 LĂ©onie Watson 2014-05-28 17:26:43 UTC
Assigned to Steve Faulkner, on behalf of the HTML A11y TF.
Comment 12 Charles McCathieNevile 2015-06-12 14:22:13 UTC
Waiting for the HTML spec to be editable again...
Comment 13 Charles McCathieNevile 2016-03-09 14:20:49 UTC
This was dealt with in https://github.com/w3c/html/pull/113
Comment 14 steve faulkner 2016-03-09 14:22:12 UTC
fixed https://github.com/w3c/html/pull/113