<?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>26622</bug_id>
          
          <creation_ts>2014-08-21 05:54:59 +0000</creation_ts>
          <short_desc>:enabled shouldn&apos;t match links, since they have no disabled state</short_desc>
          <delta_ts>2014-09-24 22:29:53 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#pseudo-classes</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>benjamin</cc>
    
    <cc>brunoabinader</cc>
    
    <cc>bzbarsky</cc>
    
    <cc>d</cc>
    
    <cc>eoconnor</cc>
    
    <cc>ian</cc>
    
    <cc>jackalmage</cc>
    
    <cc>mike</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>110381</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2014-08-21 05:54:59 +0000</bug_when>
    <thetext>Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting.html
Multipage: http://www.whatwg.org/C#pseudo-classes
Complete: http://www.whatwg.org/c#pseudo-classes
Referrer: http://www.whatwg.org/specs/web-apps/current-work/multipage/

Comment:
:enabled shouldn&apos;t match links, since they have no disabled state

Posted from: 98.110.194.132 by bzbarsky@mit.edu
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:34.0) Gecko/20100101 Firefox/34.0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>110382</commentid>
    <comment_count>1</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2014-08-21 05:55:59 +0000</bug_when>
    <thetext>http://www.w3.org/TR/selectors/#enableddisabled seems pretty clear that :enabled should only match things that can in fact be disabled....</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>110383</commentid>
    <comment_count>2</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2014-08-21 05:56:55 +0000</bug_when>
    <thetext>And there is no clear web compat need for the current spec, of course, nor obvious reasoning that I can see.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>110907</commentid>
    <comment_count>3</comment_count>
    <who name="Edward O&apos;Connor">eoconnor</who>
    <bug_when>2014-09-03 16:09:09 +0000</bug_when>
    <thetext>FWIW, I agree with Boris.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>110917</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-09-03 17:29:39 +0000</bug_when>
    <thetext>Looks like this is the way the spec has been since February 2009. I don&apos;t see any record of why.

Given that only Chrome seems to do this, I guess the spec should change.

Tab, any opinion on this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>110919</commentid>
    <comment_count>5</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-09-03 17:38:18 +0000</bug_when>
    <thetext>Apparently WebKit has recently been updated to do this too, actually.

I don&apos;t have a strong opinion one way or the other. I think it makes sense to make :link match :enabled, since it&apos;s quite possible that we&apos;ll make it possible to disable links one day. I also think there&apos;s not a very good reason to have specced this in the first place, though. The biggest reason I have to not change the spec is that flip-flopping the spec is really bad for morale amongst browser vendors, and runs a huge risk of making people ignore the spec going forward. But if pretty much all the deployed browsers do something different than what the spec says, it&apos;s easy to argue that the spec is just wrong.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>110924</commentid>
    <comment_count>6</comment_count>
    <who name="Domenic Denicola">d</who>
    <bug_when>2014-09-03 18:24:11 +0000</bug_when>
    <thetext>Speaking just as a web developer I would like to be able to disable links (preferably with the [disabled] attribute), and have :enabled/:disbabled apply to them. I have many times had to add class=&quot;disabled&quot; to my links, and change my CSS selectors from :disabled { ... } to :disabled, .disabled { ... }, and change my JS code from .setAttribute(&quot;disabled&quot;, &quot;&quot;) to .classList.add(&quot;disabled&quot;), when refactoring from button to link or similar.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>110925</commentid>
    <comment_count>7</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2014-09-03 19:24:14 +0000</bug_when>
    <thetext>I would be ok with links matching :enabled if they could in fact be disabled.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>110926</commentid>
    <comment_count>8</comment_count>
    <who name="Bruno de Oliveira Abinader">brunoabinader</who>
    <bug_when>2014-09-03 19:44:51 +0000</bug_when>
    <thetext>(In reply to Boris Zbarsky from comment #7)
&gt; I would be ok with links matching :enabled if they could in fact be disabled.

+1 for that. This would maintain current specification for :enabled, as Hixie mentioned, and provide a simpler understanding of how both :enabled and :disabled selectors behaves.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>110934</commentid>
    <comment_count>9</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-09-03 21:50:32 +0000</bug_when>
    <thetext>Well we can certainly add a feature to make links be something that can be disabled, if there&apos;s vendor interest in implementing that. But would we add that feature in the absence of this forcing function?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>110946</commentid>
    <comment_count>10</comment_count>
    <who name="Domenic Denicola">d</who>
    <bug_when>2014-09-03 22:50:39 +0000</bug_when>
    <thetext>I would ;)

More seriously, assuming this passes the Intent to Implement &quot;does this help mobile performance?&quot; gauntlet of blink-dev, I&apos;d volunteer to implement disabling links via the disabled attribute in Blink. So there&apos;s some tentative vendor interest for you...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111772</commentid>
    <comment_count>11</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-09-18 21:20:01 +0000</bug_when>
    <thetext>bz, hober: So is disabled=&quot;&quot; on &lt;a href=&quot;&quot;&gt; something you want to implement? Or is this something we should wait on for now? And if we wait, do you want :enabled to stop matching &lt;a href=&quot;&quot;&gt; even though it&apos;ll start matching it eventually if we add this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111779</commentid>
    <comment_count>12</comment_count>
    <who name="Edward O&apos;Connor">eoconnor</who>
    <bug_when>2014-09-18 23:28:06 +0000</bug_when>
    <thetext>We&apos;re not strongly for or strongly against. It seems reasonable, but it&apos;s already pretty easy to disable links in practice.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111833</commentid>
    <comment_count>13</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2014-09-19 19:29:41 +0000</bug_when>
    <thetext>I&apos;m strongly against having a halfway state, I think.  Past that, I have no strong views and no immediate plans to implement anything here....</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112147</commentid>
    <comment_count>14</comment_count>
    <who name="">contributor</who>
    <bug_when>2014-09-24 22:29:53 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r8818.
Check-in comment: Make :enabled not match &lt;a href&gt;
https://html5.org/tools/web-apps-tracker?from=8817&amp;to=8818</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>