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

[cssom-view] Does scroll-behavior affect the sequential focus navigation? #1783

Open
jihyerish opened this issue Sep 7, 2017 · 3 comments
Open

Comments

@jihyerish
Copy link
Contributor

jihyerish commented Sep 7, 2017

CSSOM Spec says about scroll-behavior, :

The scroll-behavior property specifies the scrolling behavior for a scrolling box, when scrolling happens due to navigation or CSSOM scrolling APIs. Any other scrolls, e.g. those that are performed by the user, are not affected by this property.

Does "navigation" here also include the sequential focus navigation triggered by pressing Tab?
Maybe the sequential focus navigation is "Any other scrolls".

When I see the HTML Spec and the implementation in Firefox related to scroll-behavior, it only works for the navigation to a fragment, not for the sequential focus navigation.
But interesting thing is, in Chrome, scroll-behavior works both for the navigation to a fragment and the sequential focus navigation. You can see how it works here.

I think the sequential focus navigation also need to be affected by this property.

@jihyerish
Copy link
Contributor Author

cc @zcorpan @RByers
There is a discussion about customizing scroll behavior of Element.focus(), whatwg/html#834.
Could we also customize the scroll behavior of sequential focus navigation with scroll-behavior?

@zcorpan
Copy link
Member

zcorpan commented Sep 14, 2017

Including sequential focus navigation and focus() makes sense to me and it has been requested before. Right now it falls under "any other scrolls".

https://bugzilla.mozilla.org/show_bug.cgi?id=1257600
https://lists.w3.org/Archives/Public/www-style/2016Mar/0055.html
whatwg/html#94 (comment)

@mstange

@jihyerish
Copy link
Contributor Author

jihyerish commented Sep 14, 2017

@zcorpan Thanks for the references!
Then, can we add some description to the spec such as:

  • CSSOM View:
    • Types of navigation which can specify the scrolling behavior
    • Types of scroll which are not affected by scroll-behavior
  • HTML: Add a step about adjusting scroll-behavior in the sequential focus navigation algorithm

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

3 participants