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

Shadow host with its .tabindex property -1 would be skipped for focus navigation #556

Closed
TakayoshiKochi opened this issue Aug 29, 2016 · 5 comments
Assignees

Comments

@TakayoshiKochi
Copy link
Member

Context:
#554 (comment)

In the Shadow DOM spec 6.3
http://w3c.github.io/webcomponents/spec/shadow/#sequential-focus-navigation
specifically in Step 3.1.3, all elements with negative tabindex value will be skipped in the focus navigation, but shadow hosts with delegatesFocus=faluse should be excluded otherwise all focusable elements in its shadow root will never visited.

@TakayoshiKochi TakayoshiKochi self-assigned this Aug 29, 2016
TakayoshiKochi pushed a commit to TakayoshiKochi/webcomponents that referenced this issue Aug 29, 2016
Even when a shadow host's tabindex is -1,
TakayoshiKochi pushed a commit to TakayoshiKochi/webcomponents that referenced this issue Aug 29, 2016
…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.
@annevk annevk added v1 and removed bug labels Feb 17, 2018
@rniwa
Copy link
Collaborator

rniwa commented Oct 12, 2019

@rakina : This issue seems still relevant.

@rakina
Copy link
Member

rakina commented Oct 24, 2019

Yes, the whole flat tree will be skipped when the host has negative tabindex value, as currently specced. Is there any interest in changing that?

@rniwa
Copy link
Collaborator

rniwa commented Oct 24, 2019

@rakina : I guess the users of a component decided to set tabIndex to be -1 then it's probably sensible to treat it such.

I was thinking about focusing via mouse click and such but those aren't affected by this because we've isolated that to use the first focusable element in the flat tree order.

@rniwa
Copy link
Collaborator

rniwa commented Oct 24, 2019

@smaug---- @annevk : I think we can close this issue now. WDYT?

@smaug----
Copy link

Yes, if one uses -1 on the host, the shadow DOM shouldn't get focused. Fine to close

@annevk annevk closed this as completed Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants