<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>24278</bug_id>
          
          <creation_ts>2014-01-13 10:29:46 +0000</creation_ts>
          <short_desc>should links be allowed inside labels?</short_desc>
          <delta_ts>2014-01-16 10:27:29 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>HTML5 spec</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>a11y</keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>24279</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="steve faulkner">faulkner.steve</reporter>
          <assigned_to name="steve faulkner">faulkner.steve</assigned_to>
          <cc>faulkner.steve</cc>
    
    <cc>lwatson</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>stommepoes</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>98317</commentid>
    <comment_count>0</comment_count>
    <who name="steve faulkner">faulkner.steve</who>
    <bug_when>2014-01-13 10:29:46 +0000</bug_when>
    <thetext>&quot;Phrasing content, but with no descendant labelable elements unless it is the element&apos;s labeled control, and no descendant label elements.&quot;
http://www.w3.org/html/wg/drafts/html/master/forms.html#the-label-element
example:
&lt;label for=&quot;test&quot;&gt;&lt;a href=&quot;http://google.com&quot;&gt;google&lt;/a&gt;&lt;/label&gt;&lt;input id=&quot;test&quot; type=&quot;checkbox&quot;&gt;  

or if you prefer a real world example:

&lt;input id=&quot;boston_region&quot; type=&quot;checkbox&quot; name=&quot;locations&quot; value=&quot;boston_region&quot;&gt;

&lt;label for=&quot;boston_region&quot;&gt;
	&lt;a id=&quot;x:219752177.6:mkr:dtnContent&quot; 
	class=&quot;igdt_Node igdt_NodeParent&quot;  href=&quot;#&quot; 
	title=&quot;BOR - Boston Region&quot; 
	mkr=&quot;dtnContent&quot;&gt;BOR - Boston Region&lt;/a&gt;
&lt;/label&gt;


this breaks the expected behaviour of a label activating the control in IE/chrome/firefox. 

suggest changing to &quot;no descendant interactive elements&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98322</commentid>
    <comment_count>1</comment_count>
    <who name="steve faulkner">faulkner.steve</who>
    <bug_when>2014-01-13 12:19:03 +0000</bug_when>
    <thetext>email to list on proposed change: http://lists.w3.org/Archives/Public/public-html/2014Jan/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98404</commentid>
    <comment_count>2</comment_count>
    <who name="Mallory">stommepoes</who>
    <bug_when>2014-01-14 08:14:35 +0000</bug_when>
    <thetext>I, and many others apparently, use this construct quite regularly:

&lt;input type=&quot;checkbox&quot; name=&quot;voorwaarden&quot; id=&quot;voorwaarden&quot;&gt;
&lt;label for=&quot;voorwaarden&quot;&gt;I have read and agreed to the &lt;a href=&quot;/voorwaarden&quot;&gt;General Terms and Conditions&lt;/a&gt;.&lt;/label&gt;

Removing this would probably mean relying on aria-describedby on a separate element, or hope the user&apos;s attention can remember that somewhere at the top of the form was a link to the terms even by the time they&apos;ve worked their way to the bottom.

As a hack, I&apos;ve also used anchors within labels for help text/extended label info where a natively-focusable element was preferred for simple CSS hiding and showing. However, as a hack, and now that everyone does everything with Javascript nowadays anyway, I wouldn&apos;t let this reason hold against this bug. But the first example would still hold for me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98415</commentid>
    <comment_count>3</comment_count>
    <who name="steve faulkner">faulkner.steve</who>
    <bug_when>2014-01-14 11:01:37 +0000</bug_when>
    <thetext>I agree that restricting the use of links inside labels is not a good idea.
What I have done is add a note in the spec about the positive effect for usability/accessibility of labels as it increases hit area of the labeled control, and that linking label text negates this.
https://github.com/w3c/html/commit/11c025f70bf7364e37cec508592c99916f92c3c8</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98504</commentid>
    <comment_count>4</comment_count>
    <who name="github bugzilla bot">sideshowbarker+gitzilla</who>
    <bug_when>2014-01-15 15:08:46 +0000</bug_when>
    <thetext>Commit pushed to master at https://github.com/w3c/html

https://github.com/w3c/html/commit/672b711b44f9d23a285b4d092b9927470667b14c
modified label usage note

thanks Jukka, see bug 24278</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98505</commentid>
    <comment_count>5</comment_count>
    <who name="github bugzilla bot">sideshowbarker+gitzilla</who>
    <bug_when>2014-01-15 15:39:37 +0000</bug_when>
    <thetext>Commit pushed to master at https://github.com/w3c/html

https://github.com/w3c/html/commit/23ca78557ef3b45b9ab2ca4968796273494a17ba
final tweak to label usage note

see bug 24278</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98508</commentid>
    <comment_count>6</comment_count>
    <who name="steve faulkner">faulkner.steve</who>
    <bug_when>2014-01-15 16:01:10 +0000</bug_when>
    <thetext>EDITOR&apos;S RESPONSE: This is an Editor&apos;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: partially Accepted
Change Description: added usage note see commits Comment 4 and Comment 5
Rationale: after discussion agree that links in labels should be allowed, but useful to make devs aware that labels have acc/usability benefits that are effected by inclusion of links.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98509</commentid>
    <comment_count>7</comment_count>
    <who name="github bugzilla bot">sideshowbarker+gitzilla</who>
    <bug_when>2014-01-15 16:10:26 +0000</bug_when>
    <thetext>Commit pushed to master at https://github.com/w3c/html

https://github.com/w3c/html/commit/5e3787000ce7d50ed8264e7fb84ed3493bdd8709
added markers for Bug 24278 fix</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98558</commentid>
    <comment_count>8</comment_count>
    <who name="github bugzilla bot">sideshowbarker+gitzilla</who>
    <bug_when>2014-01-16 10:27:29 +0000</bug_when>
    <thetext>Commit pushed to master at https://github.com/w3c/html

https://github.com/w3c/html/commit/c0616af1947d68ffa2c8546cab193326be3d4883
fiddle once more with label example

see bug 24278</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>