<?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>15529</bug_id>
          
          <creation_ts>2012-01-12 03:25:13 +0000</creation_ts>
          <short_desc>[Shadow]: ShadowHost&apos;s tabindex attriblue</short_desc>
          <delta_ts>2012-01-13 21:19:25 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>HISTORICAL - Component Model</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>14978</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Hayato Ito">hayato</reporter>
          <assigned_to name="Dimitri Glazkov">dglazkov</assigned_to>
          
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>62580</commentid>
    <comment_count>0</comment_count>
    <who name="Hayato Ito">hayato</who>
    <bug_when>2012-01-12 03:25:13 +0000</bug_when>
    <thetext>How should we treat ShadowHost&apos;s tabindex attribute?

Let me explain by the following example:
  &lt;input id=&apos;A&apos; tabindex=&apos;2&apos;/&gt;
    &lt;shadowhost tabindex=&apos;1&apos;&gt;
      - shadowRoot
         &lt;input id=&apos;B&apos;/&gt;
         &lt;input id=&apos;C&apos;/&gt;
    &lt;/shadowhost&gt;
  &lt;input id=&apos;D&apos; tabindex=&apos;3&apos; /&gt;

In this case, in which order should we traverse in sequential focus navigation?

1).  B -&gt; C -&gt; A -&gt; D (ShadowHost acts like a iframe element, becoming a scope of sequential focus navigation.)
2).  A -&gt; D -&gt; B -&gt; C (ShadowHost&apos;s tabindex is not honored, every elements are &apos;flattened&apos;.)
3).  Anything else?

The spec seems that say 2) is the desired behavior. Note that current WebKit&apos;s implementations acts like 1).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62588</commentid>
    <comment_count>1</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2012-01-12 04:26:48 +0000</bug_when>
    <thetext>I thought I already spec&apos;d this out: http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#focus-navigation

Can you verify and make sure there aren&apos;t holes?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62590</commentid>
    <comment_count>2</comment_count>
    <who name="Hayato Ito">hayato</who>
    <bug_when>2012-01-12 05:58:13 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; I thought I already spec&apos;d this out:
&gt; http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#focus-navigation
&gt; 
&gt; Can you verify and make sure there aren&apos;t holes?

Thank you. I&apos;ve read it and understand that the spec clearly mentioned the navigation order. Awesome.
Let me ask two questions to make sure that my understanding is correct. My questions come from the different behavior between ShadowHost and iframe.

1). If shadow host is focusable, like:

  &lt;input id=&apos;A&apos; tabindex=&apos;2&apos;/&gt;
  &lt;shadowhost id=&apos;B&apos;, tabindex=&apos;1&apos; (focusable) &gt;
    - shadowRoot
         &lt;input id=&apos;C&apos;/&gt;
         &lt;content&gt;
         &lt;input id=&apos;D&apos; tabindex=&apos;1&apos;/&gt;
    &lt;input id=&apos;E&apos; tabindex=&apos;2&apos; /&gt;
  &lt;/shadowhost&gt;
  &lt;input id=&apos;F&apos; tabindex=&apos;3&apos; /&gt;

The spec says we should navigate this tree in the following order:

Document navigation order: B &gt; A &gt; F
Shadow DOM navigation order: D &gt; E &gt; C
In total:  B &gt; D &gt; E &gt; C &gt; A &gt; F

Let me confirm that a shadow host itself (= B) participates in focus navigation, right?


2). If shadow host is not focusable like:

  &lt;input id=&apos;A&apos; tabindex=&apos;2&apos;/&gt;
  &lt;shadowhost id=&apos;B&apos;, tabindex=&apos;-1&apos; (non-focusable) &gt;
    - shadowRoot
         &lt;input id=&apos;C&apos;/&gt;
         &lt;content&gt;
         &lt;input id=&apos;D&apos; tabindex=&apos;1&apos;/&gt;
    &lt;input id=&apos;E&apos; tabindex=&apos;2&apos; /&gt;
  &lt;/shadowhost&gt;
  &lt;input id=&apos;F&apos; tabindex=&apos;3&apos; /&gt;


Document navigation order: A &gt; F &gt; B (assuming B&apos;s tabindex=0 (Does &apos;auto&apos; means tabindex=0?))
Shadow DOM navigation order: D &gt; E &gt; C
In total:  A &gt; F &gt; D &gt; E &gt; C

Let me confirm that we have no way to skip entire shadow DOM from focus navigation, right?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62603</commentid>
    <comment_count>3</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2012-01-12 17:01:28 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; (In reply to comment #1)
&gt; &gt; I thought I already spec&apos;d this out:
&gt; &gt; http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#focus-navigation
&gt; &gt; 
&gt; &gt; Can you verify and make sure there aren&apos;t holes?
&gt; 
&gt; Thank you. I&apos;ve read it and understand that the spec clearly mentioned the
&gt; navigation order. Awesome.
&gt; Let me ask two questions to make sure that my understanding is correct. My
&gt; questions come from the different behavior between ShadowHost and iframe.
&gt; 
&gt; 1). If shadow host is focusable, like:
&gt; 
&gt;   &lt;input id=&apos;A&apos; tabindex=&apos;2&apos;/&gt;
&gt;   &lt;shadowhost id=&apos;B&apos;, tabindex=&apos;1&apos; (focusable) &gt;
&gt;     - shadowRoot
&gt;          &lt;input id=&apos;C&apos;/&gt;
&gt;          &lt;content&gt;
&gt;          &lt;input id=&apos;D&apos; tabindex=&apos;1&apos;/&gt;
&gt;     &lt;input id=&apos;E&apos; tabindex=&apos;2&apos; /&gt;
&gt;   &lt;/shadowhost&gt;
&gt;   &lt;input id=&apos;F&apos; tabindex=&apos;3&apos; /&gt;



&gt; 
&gt; The spec says we should navigate this tree in the following order:
&gt; 
&gt; Document navigation order: B &gt; A &gt; F
&gt; Shadow DOM navigation order: D &gt; E &gt; C
&gt; In total:  B &gt; D &gt; E &gt; C &gt; A &gt; F
&gt; 
&gt; Let me confirm that a shadow host itself (= B) participates in focus
&gt; navigation, right?
&gt; 
&gt; 
&gt; 2). If shadow host is not focusable like:
&gt; 
&gt;   &lt;input id=&apos;A&apos; tabindex=&apos;2&apos;/&gt;
&gt;   &lt;shadowhost id=&apos;B&apos;, tabindex=&apos;-1&apos; (non-focusable) &gt;
&gt;     - shadowRoot
&gt;          &lt;input id=&apos;C&apos;/&gt;
&gt;          &lt;content&gt;
&gt;          &lt;input id=&apos;D&apos; tabindex=&apos;1&apos;/&gt;
&gt;     &lt;input id=&apos;E&apos; tabindex=&apos;2&apos; /&gt;
&gt;   &lt;/shadowhost&gt;
&gt;   &lt;input id=&apos;F&apos; tabindex=&apos;3&apos; /&gt;
&gt; 
&gt; 
&gt; Document navigation order: A &gt; F &gt; B (assuming B&apos;s tabindex=0 (Does &apos;auto&apos;
&gt; means tabindex=0?))

It means the absence of index.

&gt; Shadow DOM navigation order: D &gt; E &gt; C
&gt; In total:  A &gt; F &gt; D &gt; E &gt; C
&gt; 
&gt; Let me confirm that we have no way to skip entire shadow DOM from focus
&gt; navigation, right?

Yup. You&apos;ve got it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62688</commentid>
    <comment_count>4</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2012-01-13 21:19:25 +0000</bug_when>
    <thetext>Please reopen if this needs more work.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>