-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Clarify focusing behavior of scrollable area #2851
Comments
See also the discussion in #938 about how focus needs to be revamped. I don't really have bandwidth to work on it though. |
I really think so. Otherwise, clipped text in some overflow-divs won't be readable for users who can't, or doesn't want to, use a mouse to click+scroll the area. Can we agree to that the current spec holds => scrollers should have tabIndex=0? I need to confirm this before I fix this in Chrome and submit bugs on Safari and Edge. |
From what I can tell there are a few things going on here.
But there's nothing that says that scrollable areas should have their tabindex focus flag set (i.e., what you refer to as tabIndex=0). And there's nothing saying that they should be reachable via sequential focus navigation. There's clauses that allow the UA to do either, if it wants, but nothing requiring it. It could be nice to tighten up the spec in various ways. But I think the current intent is to allow UAs to make their own choices on different axes. So you can change Chrome, and maybe file FYI bugs on browsers, but not sure what we should do the spec level. |
I think with 1ab7c86 this is as defined as it is going to get. Browsers still want the freedom to choose whether something is focusable, and if so, in what ways, so we're not going to be able to say scrollable areas are always one way or another in the spec. But the spec now has infrastructure for precisely choosing the behavior, and e.g. how this impacts the tabIndex getter (it doesn't). |
In the current spec, scrollable area is included in focusable areas:
https://html.spec.whatwg.org/multipage/interaction.html#focusable-area
However, while surveying the behavior of modern browsers, I found they work quite differently.
Details at https://bugs.chromium.org/p/chromium/issues/detail?id=585413#c2
There seems to be several separate issues involved:
Document.activeElement
point to scrollable area (corollary::focus
match to the area?)The text was updated successfully, but these errors were encountered: