Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #556, make focus navigation work when shadow host's tabindex is -1 #557

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from

Conversation

TakayoshiKochi
Copy link
Member

The Shadow DOM spec section 6.3 (sequential focus navigation) unintentionally excluded all shadow hosts with nagative tabindex in Step 3.1.3. This was unexpected for shadow hosts with delagatesFocus=false shadow root.

Before:

  • Exclude all shadow hosts with tabindex < 0

After:

  • Allow shadow hosts with tabindex < 0, but only when delegatesFocus=false
  • In sorting by tabindex, treat such shadow hosts as tabindex=0
  • Exclude those shadow hosts in Step 4.

…is -1

The Shadow DOM spec section 6.3 (sequential focus navigation)
unintentionally excluded all shadow hosts with nagative tabindex in Step
3.1.3. This was unexpected for shadow hosts with `delagatesFocus=false`
shadow root.

Before:
 - Exclude all shadow hosts with tabindex < 0

After:
 - Allow shadow hosts with tabindex < 0, but only when
   `delegatesFocus=false`
 - In sorting by tabindex, treat such shadow hosts as `tabindex=0`
 - Exclude those shadow hosts in Step 4.
<li>Otherwise, append <var>ELEMENT</var> to <var>NAVIGATION-ORDER</var>.</li>
</ol>
</li>
<li>Otherwise if <var>ELEMENT</var> is focusable, or a <a>slot element</a>, and its <a>tabindex</a> value is not negative, append <var>ELEMENT</var> to <var>NAVIGATION-ORDER</var>.</li>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "and", "or" relationship are confusing. Could you make this explicit?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants