<?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>27965</bug_id>
          
          <creation_ts>2015-02-05 07:51:29 +0000</creation_ts>
          <short_desc>[Shadow]: Shadow host with tabindex=-1, all descendent tree should be ignored for tab navigation</short_desc>
          <delta_ts>2015-05-27 03:06:43 +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>MOVED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>a11y_focus</keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>28552</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Takayoshi Kochi">kochi</reporter>
          <assigned_to name="Hayato Ito">hayato</assigned_to>
          <cc>chaals</cc>
    
    <cc>dglazkov</cc>
    
    <cc>hayato</cc>
    
    <cc>mike</cc>
    
    <cc>public-webapps</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>117704</commentid>
    <comment_count>0</comment_count>
    <who name="Takayoshi Kochi">kochi</who>
    <bug_when>2015-02-05 07:51:29 +0000</bug_when>
    <thetext>In the current Shadow DOM spec, basically focusable nodes in a shadow tree are inserted after their shadow host in the tab navigation order.

This means that when shadow host has &quot;tabindex=-1&quot;, the host itself is skipped in the order, but right after the host the descendant nodes in its shadow tree will be visited.

This is probably not the behavior that a component author or user would expect.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>118020</commentid>
    <comment_count>1</comment_count>
    <who name="Charles McCathieNevile">chaals</who>
    <bug_when>2015-02-19 06:00:33 +0000</bug_when>
    <thetext>I&apos;m not immediately clear why this would be unexpected...

A couple of scenarios:

- A date picker should have a tabindex at its root, so this doesn&apos;t arise.

- A sound mixer may well begin with a bunch of non-interactive material, and be the main component on a page. So it seem logical that it doesn&apos;t have a tabindex at the root (although it might well be a landmark, in screen reader navigation terms).

Am I missing something obvious? (That seems quite possible)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>118171</commentid>
    <comment_count>2</comment_count>
    <who name="Takayoshi Kochi">kochi</who>
    <bug_when>2015-02-26 06:10:12 +0000</bug_when>
    <thetext>Let me explain an example.

Suppose I have an component (which is out of control of mine)
2 focusables contained in a shadow.

&lt;login-extras&gt;
 |#shadow-root
 | &lt;input type=checkbox&gt; save cookie
 | &lt;a href=&quot;http://example.com/help&quot;&gt;Help&lt;/a&gt;
&lt;/login-extras&gt;

I put it in some form:

&lt;form&gt;
 Name: &lt;input&gt;
 Password: &lt;input type=password&gt;
 &lt;login-extras&gt;&lt;/login-extras&gt;
 &lt;input type=submit value=&quot;login&quot;&gt;
&lt;/form&gt;

And want to skip &lt;login-extra&gt; for typical cases, only require
name and password then user can hit login button.
So I put tabindex=-1 in &lt;login-extras&gt;

&lt;form&gt;
 Name: &lt;input&gt;
 Password: &lt;input type=password&gt;
 &lt;login-extras tabindex=-1&gt;&lt;/login-extras&gt;
 &lt;input type=submit value=&quot;login&quot;&gt;
&lt;/form&gt;

Actually, this doesn&apos;t skip the checkbox and help link.
Demo: http://jsfiddle.net/4y3xntx8/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>118177</commentid>
    <comment_count>3</comment_count>
    <who name="Charles McCathieNevile">chaals</who>
    <bug_when>2015-02-26 10:43:04 +0000</bug_when>
    <thetext>Thanks for the example.

I *think* the general idea makes sense - changing the shadow root&apos;s tabindex should apply to whatever is in the component.

There is an analagous situation in aria. I&apos;ll have a look what they say, but I suspect their answer will be &quot;build JS that manages this&quot;, which doesn&apos;t really help in this case…

(There is a problem with the example: the functionality inaccessible for keyboard. The normal interaction pattern would be to fill in the things you want, then hit enter to submit the form.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>120516</commentid>
    <comment_count>4</comment_count>
    <who name="Hayato Ito">hayato</who>
    <bug_when>2015-05-27 03:06:43 +0000</bug_when>
    <thetext>Moved to https://github.com/w3c/webcomponents/issues/86</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>