<?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>18995</bug_id>
          
          <creation_ts>2012-09-24 22:58:23 +0000</creation_ts>
          <short_desc>Snippet: &quot;The tabIndex IDL attribute must reflect the value of the tabindex content attribute. Its default value is 0 for elements that are focusable and −1 for elements that are not focusable.&quot; Comment: Default value of -1 for the tabIndex IDL attribute</short_desc>
          <delta_ts>2012-10-12 20:06:38 +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>NEEDSINFO</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#negative-tabindex</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>ian</cc>
    
    <cc>mike</cc>
    
    <cc>sumeet</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>74371</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2012-09-24 22:58:23 +0000</bug_when>
    <thetext>Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html
Multipage: http://www.whatwg.org/C#negative-tabindex
Complete: http://www.whatwg.org/c#negative-tabindex

Comment:
Snippet: &quot;The tabIndex IDL attribute must reflect the value of the tabindex
content attribute. Its default value is 0 for elements that are focusable and
−1 for elements that are not focusable.&quot; Comment: Default value of -1 for
the tabIndex IDL attribute of non-focussable elements appears wrong because a
-1 value of the content-attribute (per the spec.) causes the tabindex focus
flag to be set which should cause the element to be focussable if it was being
rendered. In this situation the IDL value would have to reflect the
content-attribute -1 even while the element was focussable.

Posted from: 24.4.130.88
User agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.89 Safari/537.1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76125</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-10-12 17:44:17 +0000</bug_when>
    <thetext>What would you suggest it return instead? What do browsers do?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76160</commentid>
    <comment_count>2</comment_count>
    <who name="Sumeet">sumeet</who>
    <bug_when>2012-10-12 20:06:38 +0000</bug_when>
    <thetext>Hello Ian,
   Ah, I realize that you are trying to document what is actually happening the browsers and not necessarily how things should be. After your comment I checked the value of tabIndex on div elements (I verified that they didn&apos;t have a tabIndex attribute on them) on the 4 browsers and here&apos;s what I found:

1. Chrome (22) : tabIndex = -1.
2. Safari (5.15): tabIndex = -1
3. Firefox (12.0): tabindex = -1
4. IE (19): tabIndex = 0 !!

So except for IE 9 the other three do what the spec. says. I am assuming that IE 10 will fix that. In any case, this just corroborates the issue that I was alluded to earlier, that there is no way for a script to tell whether the -1 value means that the element is non-focussable or whether it is focussable but not tabbable (this situation would occur if the tabindex content-attribute was set to value -1). This is an API design issue - I&apos;m not sure whether this is the right place to bring it up. My apologies if it isn&apos;t.

Best Regards,
Sumeet Singh</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>