[wpt-sync] Sync PR 19965 - Fix default tabIndex IDL attribute values
Categories
(Core :: DOM: Core & HTML, task, P4)
Tracking
()
Tracking | Status | |
---|---|---|
firefox72 | --- | fixed |
People
(Reporter: mozilla.org, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Attachments
(1 file)
Sync web-platform-tests PR 19965 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/19965
Details from upstream follow.
Kent Tamura <tkent@chromium.org> wrote:
Fix default tabIndex IDL attribute values
We follow https://html.spec.whatwg.org/C/#dom-tabindex by this CL.
The old behavior of default tabIndex was something like "Returns 0
if the element is focusable, -1 otherwise". But it didn't match to
the HTML standard, and was not interoperable.Since this CL, some elements return -1 if "tabindex" attribute is
missing or invalid regardless of their focusability.Implementation:
Node::tabIndex() is not a virtual function any longer. We have only
Element::tabIndex(), and it calls virtual DefaultTabIndex() if
"tabindex" attribute is missing or invalid.DefaultTabIndex() for elements listed in the specification returns 0.
Otherwise, it returns -1.
- HTMLAnchorElement affects \<a> and \<area>
- HTMLFormControlElementWithState affects \<input>, \<select>, and
\<textarea>.- HTMLFrameElementBase affects \<frame> and \<iframe>
Blink can't use Element::tabIndex() for the purpose of focusability
check any longer. This CL updates existing tabIndex() callsites to
avoid behavior changes.Change-Id: Ib1728d6be98ccf589fc0e3e153d07eb973532e25
Bug: 982350Reviewed-on: https://chromium-review.googlesource.com/1883350
WPT-Export-Revision: 13ab4abc746835f81dfb02d02dbab0686b83e1be
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/#/jobs?repo=try&revision=2cea8547656939969e9af0da99ec20437dccb206
Assignee | ||
Comment 2•5 years ago
|
||
GitHub CI Results
wpt.fyi PR Results Base Results
Ran 1 tests and 120 subtests
Firefox
OK : 1
PASS: 120
Chrome
OK : 1
PASS: 111
FAIL: 9
Safari
OK : 1
PASS: 120
Gecko CI Results
Ran 1 tests and 120 subtests
OK : 1
PASS : 120
Assignee | ||
Comment 3•5 years ago
|
||
Automatic update from web-platform-tests
Fix default tabIndex IDL attribute values
We follow https://html.spec.whatwg.org/C/#dom-tabindex by this CL.
The old behavior of default tabIndex was something like "Returns 0
if the element is focusable, -1 otherwise". But it didn't match to
the HTML standard, and was not interoperable.
Since this CL, some elements return -1 if "tabindex" attribute is
missing or invalid regardless of their focusability.
Implementation:
Node::tabIndex() is not a virtual function any longer. We have only
Element::tabIndex(), and it calls virtual DefaultTabIndex() if
"tabindex" attribute is missing or invalid.
DefaultTabIndex() for elements listed in the specification returns 0.
Otherwise, it returns -1.
- HTMLAnchorElement affects <a> and <area>
- HTMLFormControlElementWithState affects <input>, <select>, and
<textarea>. - HTMLFrameElementBase affects <frame> and <iframe>
Blink can't use Element::tabIndex() for the purpose of focusability
check any longer. This CL updates existing tabIndex() callsites to
avoid behavior changes.
Change-Id: Ib1728d6be98ccf589fc0e3e153d07eb973532e25
Bug: 982350
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1883350
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#710206}
--
wpt-commits: c04bd1aa9ff4aa4075a33c2cca51a60d3a8c1b54
wpt-pr: 19965
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9c48afb37fc8 [wpt PR 19965] - Fix default tabIndex IDL attribute values, a=testonly
Comment 5•5 years ago
|
||
bugherder |
Description
•