RESOLVED FIXED Bug 200834
The default tab index of output and fieldset should be -1
https://bugs.webkit.org/show_bug.cgi?id=200834
Summary The default tab index of output and fieldset should be -1
Ryosuke Niwa
Reported 2019-08-16 15:08:31 PDT
According to the latest HTML specification, the default tab index of output, fieldset, and keygen should be -1. This is also the behavior of Chrome & Firefox.
Attachments
Fixes the bug (15.20 KB, patch)
2019-08-16 16:49 PDT, Ryosuke Niwa
achristensen: review+
Ryosuke Niwa
Comment 2 2019-08-16 16:39:02 PDT
Apparently keygen had been dropped from the standard and other browser have removed it.
Ryosuke Niwa
Comment 3 2019-08-16 16:49:17 PDT
Created attachment 376568 [details] Fixes the bug
Alex Christensen
Comment 4 2019-08-19 10:48:41 PDT
Comment on attachment 376568 [details] Fixes the bug View in context: https://bugs.webkit.org/attachment.cgi?id=376568&action=review > Source/WebCore/ChangeLog:35 > + Test: fast/dom/tabindex-defaults.html No web platform test? > Source/WebCore/html/HTMLButtonElement.h:54 > + int defaultTabIndex() const; Should this be "override" or "final"? > Source/WebCore/html/HTMLTextAreaElement.h:116 > + int defaultTabIndex() const; ditto.
Ryosuke Niwa
Comment 5 2019-08-20 12:43:16 PDT
Comment on attachment 376568 [details] Fixes the bug View in context: https://bugs.webkit.org/attachment.cgi?id=376568&action=review >> Source/WebCore/ChangeLog:35 >> + Test: fast/dom/tabindex-defaults.html > > No web platform test? There is one test upstream but they don't test output and fieldset. >> Source/WebCore/html/HTMLButtonElement.h:54 >> + int defaultTabIndex() const; > > Should this be "override" or "final"? Yes. Fixed to be final. >> Source/WebCore/html/HTMLTextAreaElement.h:116 >> + int defaultTabIndex() const; > > ditto. Also fixed.
Ryosuke Niwa
Comment 6 2019-08-20 12:59:02 PDT
Radar WebKit Bug Importer
Comment 7 2019-08-20 12:59:18 PDT
Ryan Haddad
Comment 8 2019-08-20 17:01:06 PDT
(In reply to Ryosuke Niwa from comment #6) > Committed r248914: <https://trac.webkit.org/changeset/248914> imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmlformcontrolscollection.html is failing after this change --- /Volumes/Data/slave/mojave-release-tests-wk2/build/layout-test-results/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmlformcontrolscollection-expected.txt +++ /Volumes/Data/slave/mojave-release-tests-wk2/build/layout-test-results/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmlformcontrolscollection-actual.txt @@ -1,5 +1,5 @@ -PASS The length attribute must return the number of elements in the form +FAIL The length attribute must return the number of elements in the form assert_equals: The length attribute is incorrect. expected 1 but got 2 PASS HTMLFormControlsCollection.item(index) must return the indexed item PASS HTMLFormControlsCollection[index] must return the indexed item PASS HTMLFormControlsCollection is not callable @@ -10,6 +10,7 @@ PASS The namedItem(name) must return null if the name is empty PASS The namedItem(name) must return null if there is no matched element PASS Controls can be indexed by id or name attribute +FAIL Keygen controls do not show up at all assert_equals: Keygen does not show up when queried by id. expected null but got Element node <keygen id="kg" name="key"></keygen> PASS The namedItem(name) must return the items with id or name attribute PASS The HTMLFormControlsCollection interface is used for collections of listed elements in form element PASS The HTMLFormControlsCollection interface is used for collections of listed elements in fieldset element
Ryosuke Niwa
Comment 9 2019-08-20 17:04:47 PDT
(In reply to Ryan Haddad from comment #8) > (In reply to Ryosuke Niwa from comment #6) > > Committed r248914: <https://trac.webkit.org/changeset/248914> > > imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/ > collections/htmlformcontrolscollection.html is failing after this change > > --- > /Volumes/Data/slave/mojave-release-tests-wk2/build/layout-test-results/ > imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/ > collections/htmlformcontrolscollection-expected.txt > +++ > /Volumes/Data/slave/mojave-release-tests-wk2/build/layout-test-results/ > imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/ > collections/htmlformcontrolscollection-actual.txt > @@ -1,5 +1,5 @@ > > -PASS The length attribute must return the number of elements in the form > +FAIL The length attribute must return the number of elements in the form > assert_equals: The length attribute is incorrect. expected 1 but got 2 > PASS HTMLFormControlsCollection.item(index) must return the indexed item > PASS HTMLFormControlsCollection[index] must return the indexed item > PASS HTMLFormControlsCollection is not callable > @@ -10,6 +10,7 @@ > PASS The namedItem(name) must return null if the name is empty > PASS The namedItem(name) must return null if there is no matched element > PASS Controls can be indexed by id or name attribute > +FAIL Keygen controls do not show up at all assert_equals: Keygen does not > show up when queried by id. expected null but got Element node <keygen > id="kg" name="key"></keygen> > PASS The namedItem(name) must return the items with id or name attribute > PASS The HTMLFormControlsCollection interface is used for collections of > listed elements in form element > PASS The HTMLFormControlsCollection interface is used for collections of > listed elements in fieldset element Ugh... my commit had a superfluous change to LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmlformcontrolscollection.html. Reverting the test change now.
Ryosuke Niwa
Comment 10 2019-08-20 17:10:13 PDT
Note You need to log in before you can comment on or make changes to this bug.