-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
HTML: WPT for tabIndex #17657
HTML: WPT for tabIndex #17657
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Only have some optional nits.
...nteraction/focus/sequential-focus-navigation-and-the-tabindex-attribute/tabindex-getter.html
Outdated
Show resolved
Hide resolved
...nteraction/focus/sequential-focus-navigation-and-the-tabindex-attribute/tabindex-getter.html
Outdated
Show resolved
Hide resolved
...nteraction/focus/sequential-focus-navigation-and-the-tabindex-attribute/tabindex-getter.html
Outdated
Show resolved
Hide resolved
...nteraction/focus/sequential-focus-navigation-and-the-tabindex-attribute/tabindex-getter.html
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with @annevk's nits. I'm glad you tested the cases like disabled/hidden and has a href/doesn't have a href.
It's impressive that all browsers agree here.
This updates the tabIndex getter's default value to be 0 for a specific list of element types, instead of the spec's previous "elements that are focusable". This matches reality better; apart from minor edge cases all three browser engines match this spec in observable behavior. Closes #1786. Closes #4464. See the focus meta-bug in #4607 for related discussions, including on adding an API that actually reflects whether an element is focusable (like the tabIndex getter was kind-of supposed to do). Tests: web-platform-tests/wpt#17657
Let's merge this test. |
* HTML: WPT for tabIndex
See whatwg/html#4754 for the spec change.
This is consistent with behaviors in Chrome, Safari, Firefox - see table in whatwg/html#4464 (comment) Chrome is failing for the case with shadow host with delegatesFocus=true)