-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
tabIndex defaults to −1 for non-tabbing elements #938
Conversation
Can we check what browsers do here? I don't have a Mac to test with, but it seems like a normative change of this kind is somewhat of a big deal. |
I figured @bzbarsky would have tested, but testing this for I should probably add a clarifying note here (instead of changing the normative requirements) that sequential focus navigation is immaterial to whether or not |
Yeah, browsers are rather inconsistent in terms of when they follow the current spec and when not, and I'm not sure the spec's model of a boolean "focusable" value makes sense either; see below. Some examples, on Mac, with default OS settings (i.e. "In windows and dialogs, press Tab to move keyboard focus between text boxes and lists only"):
An
|
So that would mean we'd need "mouse focusable", "tab focusable", but then that probably varies per platform too? Touch? User interaction depending on platform is why I've never been super thrilled to sort out how it works, since there's not really a canonical model. Not sure what to do here. |
On IRC bz mentioned: "the weirdness of how :focus and :-moz-focusring differ (and the fact that the latter has to exist), the fact that some things take focus without drawing focus rings, but it depends on OS and on how you focused them". That seems like another thing that needs to be defined. |
Note that the "what draws focus rings" behavior may be in flux in browsers still. See, for example, https://bugzilla.mozilla.org/show_bug.cgi?id=735251 |
And in particular, some elements show a focus ring whenever they're focused, some only when they are focused via keyboard, and which ones are in which bucket may vary by platform and OS (accessibility) settings, just like which set of elements are tabbable can vary. |
So what can we reasonably define? It sounds like we can define that there are different groups (tab focusable, mouse focusable, shows focus ring), but we cannot define what those groups consist of (although maybe we can say |
That doesn't seem unreasonable. |
Closing this in favor of #1786 which has a more current discussion. |
Fixes https://www.w3.org/Bugs/Public/show_bug.cgi?id=29093.