-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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 and interactive content #5414
Comments
Chromium bug for this: https://crbug.com/1065048 |
In mildly in favor of changing implementations in this regard as it seems like authors would benefit from getting the label-clicking behavior for their custom controls using On the other hand, the custom elements proposal makes this slightly less urgent, if we want to avoid any compat issues, since we could say that the best way to create custom focusable controls is to use that proposal instead of using |
According to the HTML Standard [1]: > An element with the tabindex attribute specified is interactive > content. In a subsequent review [2], this clause is reaffirmed by the editor of HTML. Thus, we implement this accordingly. This commit also adds comprehensive testing for all kinds of interactive content, which have differential treatment by the <label> element relative to other elements. [1]: https://html.spec.whatwg.org/C/#the-tabindex-attribute [2]: whatwg/html#5414 Fixed: 1065048 Change-Id: I8deff810fead2c9170e18dd4d06dc642f68e6742
According to the HTML Standard [1]: > An element with the tabindex attribute specified is interactive > content. In a subsequent review [2], this clause is reaffirmed by the editor of HTML. Thus, we implement this accordingly. This commit also adds comprehensive testing for all kinds of interactive content, which have differential treatment by the <label> element relative to other elements. [1]: https://html.spec.whatwg.org/C/#the-tabindex-attribute [2]: whatwg/html#5414 Fixed: 1065048 Change-Id: I8deff810fead2c9170e18dd4d06dc642f68e6742
According to the HTML Standard [1]: > An element with the tabindex attribute specified is interactive > content. In a subsequent review [2], this clause is reaffirmed by the editor of HTML. Thus, we implement this accordingly. This commit also adds comprehensive testing for all kinds of interactive content, which have differential treatment by the <label> element relative to other elements. [1]: https://html.spec.whatwg.org/C/#the-tabindex-attribute [2]: whatwg/html#5414 Fixed: 1065048 Change-Id: I8deff810fead2c9170e18dd4d06dc642f68e6742
According to the HTML Standard [1]: > An element with the tabindex attribute specified is interactive > content. In a subsequent review [2], this clause is reaffirmed by the editor of HTML. Thus, we implement this accordingly. This commit also adds comprehensive testing for all kinds of interactive content, which have differential treatment by the <label> element relative to other elements. [1]: https://html.spec.whatwg.org/C/#the-tabindex-attribute [2]: whatwg/html#5414 Fixed: 1065048 Change-Id: I8deff810fead2c9170e18dd4d06dc642f68e6742
According to the HTML Standard [1]: > An element with the tabindex attribute specified is interactive > content. In a subsequent review [2], this clause is reaffirmed by the editor of HTML. Thus, we implement this accordingly. This commit also adds comprehensive testing for all kinds of interactive content, which have differential treatment by the <label> element relative to other elements. [1]: https://html.spec.whatwg.org/C/#the-tabindex-attribute [2]: whatwg/html#5414 Fixed: 1065048 Change-Id: I8deff810fead2c9170e18dd4d06dc642f68e6742
According to the HTML Standard [1]: > An element with the tabindex attribute specified is interactive > content. In a subsequent review [2], this clause is reaffirmed by the editor of HTML. Thus, we implement this accordingly. This commit also adds comprehensive testing for all kinds of interactive content, which have differential treatment by the <label> element relative to other elements. [1]: https://html.spec.whatwg.org/C/#the-tabindex-attribute [2]: whatwg/html#5414 Fixed: 1065048 Change-Id: I8deff810fead2c9170e18dd4d06dc642f68e6742
According to the HTML Standard [1]: > An element with the tabindex attribute specified is interactive > content. In a subsequent review [2], this clause is reaffirmed by the editor of HTML. Thus, we implement this accordingly. This commit also adds comprehensive testing for all kinds of interactive content, which have differential treatment by the <label> element relative to other elements. [1]: https://html.spec.whatwg.org/C/#the-tabindex-attribute [2]: whatwg/html#5414 Fixed: 1065048 Change-Id: I8deff810fead2c9170e18dd4d06dc642f68e6742 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2122369 Commit-Queue: Timothy Gu <timothygu@chromium.org> Reviewed-by: Kent Tamura <tkent@chromium.org> Reviewed-by: Mason Freed <masonfreed@chromium.org> Cr-Commit-Position: refs/heads/master@{#757590}
Chrome has been fixed. Gecko bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1628500 WebKit bug: https://bugs.webkit.org/show_bug.cgi?id=210223 |
According to the HTML Standard [1]: > An element with the tabindex attribute specified is interactive > content. In a subsequent review [2], this clause is reaffirmed by the editor of HTML. Thus, we implement this accordingly. This commit also adds comprehensive testing for all kinds of interactive content, which have differential treatment by the <label> element relative to other elements. [1]: https://html.spec.whatwg.org/C/#the-tabindex-attribute [2]: whatwg/html#5414 Fixed: 1065048 Change-Id: I8deff810fead2c9170e18dd4d06dc642f68e6742 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2122369 Commit-Queue: Timothy Gu <timothygu@chromium.org> Reviewed-by: Kent Tamura <tkent@chromium.org> Reviewed-by: Mason Freed <masonfreed@chromium.org> Cr-Commit-Position: refs/heads/master@{#757590}
According to the HTML Standard [1]: > An element with the tabindex attribute specified is interactive > content. In a subsequent review [2], this clause is reaffirmed by the editor of HTML. Thus, we implement this accordingly. This commit also adds comprehensive testing for all kinds of interactive content, which have differential treatment by the <label> element relative to other elements. [1]: https://html.spec.whatwg.org/C/#the-tabindex-attribute [2]: whatwg/html#5414 Fixed: 1065048 Change-Id: I8deff810fead2c9170e18dd4d06dc642f68e6742 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2122369 Commit-Queue: Timothy Gu <timothygu@chromium.org> Reviewed-by: Kent Tamura <tkent@chromium.org> Reviewed-by: Mason Freed <masonfreed@chromium.org> Cr-Commit-Position: refs/heads/master@{#757590}
Unfortunately, this appears to be Web incompatible. According to https://crbug.com/1069615, websites are already depending on the behavior that <label for="billing-address" class="check-box-label">
<input type="checkbox" role="checkbox" data-talos="checkboxShipToBillingAddress" id="billing-address" name="billing-address" checked="">
<i class="check-box-icon" tabindex="0" role="checkbox" aria-checked="true" title="Same as shipping address" aria-labelledby="Same as shipping address"></i>
Same as shipping address</label> Considering that I doubt this is the only website out there that does such a thing, I think we need to change the spec to accommodate. Two ways of doing this:
The first is cleaner and what implementations do, and is what I’d prefer. One can argue that it diminishes the semantic meaning of What do people think? |
Thanks to you and to Chromium for taking the hit and discovering this! (1) does sound nicer, but the question is what impact it would have on conformance requirements. Interestingly the canvas element already includes an exception for tabindex. But e.g. this would start allowing Your point about click-handler-having buttons already being allowed as Another point is that if we go with (2), then effectively the spec has two definitions of interactive content: one which affects user agent implementation requirements, and one which affects conformance checkers. This is prone to future inconsistency or misuse, e.g. if we add another feature which has user agent implementation requirements with regard to interactive content, which definition will we use? I'll summon our usual conformance-requirement experts, @sideshowbarker and @zcorpan, to see what they think. I'm leaning a bit toward (1), but not strongly. |
…ve content" This reverts commit 7920b6e87ccb0640fc53ba264b6d1500325cb2f9. It turns out that this change is not web compatible. In addition to reverting the original change, we will seek to change the spec to reflect this web reality. Only the changes to Blink code are fully reverted. The tests are kept, but adapted to reflect this change. A comment update is also kept. Original change's description: > Treat any HTML element with a tabindex attribute as interactive content > > According to the HTML Standard [1]: > > > An element with the tabindex attribute specified is interactive > > content. > > In a subsequent review [2], this clause is reaffirmed by the editor of > HTML. Thus, we implement this accordingly. > > This commit also adds comprehensive testing for all kinds of interactive > content, which have differential treatment by the <label> element > relative to other elements. > > [1]: https://html.spec.whatwg.org/C/#the-tabindex-attribute > [2]: whatwg/html#5414 > > Fixed: 1065048 > Change-Id: I8deff810fead2c9170e18dd4d06dc642f68e6742 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2122369 > Commit-Queue: Timothy Gu <timothygu@chromium.org> > Reviewed-by: Kent Tamura <tkent@chromium.org> > Reviewed-by: Mason Freed <masonfreed@chromium.org> > Cr-Commit-Position: refs/heads/master@{#757590} Bug: 1065048 Change-Id: Ic32dbb9ac8eafb9b92a131fde71c5459029260e2 Fixed: 1069615
…ttribute as interactive content, a=testonly Automatic update from web-platform-tests Treat any HTML element with a tabindex attribute as interactive content According to the HTML Standard [1]: > An element with the tabindex attribute specified is interactive > content. In a subsequent review [2], this clause is reaffirmed by the editor of HTML. Thus, we implement this accordingly. This commit also adds comprehensive testing for all kinds of interactive content, which have differential treatment by the <label> element relative to other elements. [1]: https://html.spec.whatwg.org/C/#the-tabindex-attribute [2]: whatwg/html#5414 Fixed: 1065048 Change-Id: I8deff810fead2c9170e18dd4d06dc642f68e6742 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2122369 Commit-Queue: Timothy Gu <timothygu@chromium.org> Reviewed-by: Kent Tamura <tkent@chromium.org> Reviewed-by: Mason Freed <masonfreed@chromium.org> Cr-Commit-Position: refs/heads/master@{#757590} -- wpt-commits: 9549d1a3a8978754cbb97673e83f4fc56e461122 wpt-pr: 22749
As it turns out, there's already this clause for the
So going with (1) would remove this special case, which IMO is a good thing. |
…ve content" This reverts commit 7920b6e87ccb0640fc53ba264b6d1500325cb2f9. It turns out that this change is not web compatible. In addition to reverting the original change, we will seek to change the spec to reflect this web reality. Only the changes to Blink code are fully reverted. The tests are kept, but adapted to reflect this change. A comment update is also kept. Original change's description: > Treat any HTML element with a tabindex attribute as interactive content > > According to the HTML Standard [1]: > > > An element with the tabindex attribute specified is interactive > > content. > > In a subsequent review [2], this clause is reaffirmed by the editor of > HTML. Thus, we implement this accordingly. > > This commit also adds comprehensive testing for all kinds of interactive > content, which have differential treatment by the <label> element > relative to other elements. > > [1]: https://html.spec.whatwg.org/C/#the-tabindex-attribute > [2]: whatwg/html#5414 > > Fixed: 1065048 > Change-Id: I8deff810fead2c9170e18dd4d06dc642f68e6742 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2122369 > Commit-Queue: Timothy Gu <timothygu@chromium.org> > Reviewed-by: Kent Tamura <tkent@chromium.org> > Reviewed-by: Mason Freed <masonfreed@chromium.org> > Cr-Commit-Position: refs/heads/master@{#757590} Bug: 1065048 Change-Id: Ic32dbb9ac8eafb9b92a131fde71c5459029260e2 Fixed: 1069615 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2146089 Reviewed-by: Kent Tamura <tkent@chromium.org> Reviewed-by: Mason Freed <masonfreed@chromium.org> Commit-Queue: Timothy Gu <timothygu@chromium.org> Cr-Commit-Position: refs/heads/master@{#758568}
…ve content" This reverts commit 7920b6e. It turns out that this change is not web compatible. In addition to reverting the original change, we will seek to change the spec to reflect this web reality. Only the changes to Blink code are fully reverted. The tests are kept, but adapted to reflect this change. A comment update is also kept. Original change's description: > Treat any HTML element with a tabindex attribute as interactive content > > According to the HTML Standard [1]: > > > An element with the tabindex attribute specified is interactive > > content. > > In a subsequent review [2], this clause is reaffirmed by the editor of > HTML. Thus, we implement this accordingly. > > This commit also adds comprehensive testing for all kinds of interactive > content, which have differential treatment by the <label> element > relative to other elements. > > [1]: https://html.spec.whatwg.org/C/#the-tabindex-attribute > [2]: whatwg/html#5414 > > Fixed: 1065048 > Change-Id: I8deff810fead2c9170e18dd4d06dc642f68e6742 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2122369 > Commit-Queue: Timothy Gu <timothygu@chromium.org> > Reviewed-by: Kent Tamura <tkent@chromium.org> > Reviewed-by: Mason Freed <masonfreed@chromium.org> > Cr-Commit-Position: refs/heads/master@{#757590} Bug: 1065048 Change-Id: Ic32dbb9ac8eafb9b92a131fde71c5459029260e2 Fixed: 1069615 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2146089 Reviewed-by: Kent Tamura <tkent@chromium.org> Reviewed-by: Mason Freed <masonfreed@chromium.org> Commit-Queue: Timothy Gu <timothygu@chromium.org> Cr-Commit-Position: refs/heads/master@{#758568}
…ve content" This reverts commit 7920b6e87ccb0640fc53ba264b6d1500325cb2f9. It turns out that this change is not web compatible. In addition to reverting the original change, we will seek to change the spec to reflect this web reality. Only the changes to Blink code are fully reverted. The tests are kept, but adapted to reflect this change. A comment update is also kept. Original change's description: > Treat any HTML element with a tabindex attribute as interactive content > > According to the HTML Standard [1]: > > > An element with the tabindex attribute specified is interactive > > content. > > In a subsequent review [2], this clause is reaffirmed by the editor of > HTML. Thus, we implement this accordingly. > > This commit also adds comprehensive testing for all kinds of interactive > content, which have differential treatment by the <label> element > relative to other elements. > > [1]: https://html.spec.whatwg.org/C/#the-tabindex-attribute > [2]: whatwg/html#5414 > > Fixed: 1065048 > Change-Id: I8deff810fead2c9170e18dd4d06dc642f68e6742 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2122369 > Commit-Queue: Timothy Gu <timothygu@chromium.org> > Reviewed-by: Kent Tamura <tkent@chromium.org> > Reviewed-by: Mason Freed <masonfreed@chromium.org> > Cr-Commit-Position: refs/heads/master@{#757590} Bug: 1065048 Change-Id: Ic32dbb9ac8eafb9b92a131fde71c5459029260e2 Fixed: 1069615 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2146089 Reviewed-by: Kent Tamura <tkent@chromium.org> Reviewed-by: Mason Freed <masonfreed@chromium.org> Commit-Queue: Timothy Gu <timothygu@chromium.org> Cr-Commit-Position: refs/heads/master@{#758568}
…ttribute as interactive content, a=testonly Automatic update from web-platform-tests Treat any HTML element with a tabindex attribute as interactive content According to the HTML Standard [1]: > An element with the tabindex attribute specified is interactive > content. In a subsequent review [2], this clause is reaffirmed by the editor of HTML. Thus, we implement this accordingly. This commit also adds comprehensive testing for all kinds of interactive content, which have differential treatment by the <label> element relative to other elements. [1]: https://html.spec.whatwg.org/C/#the-tabindex-attribute [2]: whatwg/html#5414 Fixed: 1065048 Change-Id: I8deff810fead2c9170e18dd4d06dc642f68e6742 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2122369 Commit-Queue: Timothy Gu <timothygu@chromium.org> Reviewed-by: Kent Tamura <tkent@chromium.org> Reviewed-by: Mason Freed <masonfreed@chromium.org> Cr-Commit-Position: refs/heads/master@{#757590} -- wpt-commits: 9549d1a3a8978754cbb97673e83f4fc56e461122 wpt-pr: 22749
…bindex attribute as interactive content", a=testonly Automatic update from web-platform-tests Revert "Treat any HTML element with a tabindex attribute as interactive content" This reverts commit 7920b6e87ccb0640fc53ba264b6d1500325cb2f9. It turns out that this change is not web compatible. In addition to reverting the original change, we will seek to change the spec to reflect this web reality. Only the changes to Blink code are fully reverted. The tests are kept, but adapted to reflect this change. A comment update is also kept. Original change's description: > Treat any HTML element with a tabindex attribute as interactive content > > According to the HTML Standard [1]: > > > An element with the tabindex attribute specified is interactive > > content. > > In a subsequent review [2], this clause is reaffirmed by the editor of > HTML. Thus, we implement this accordingly. > > This commit also adds comprehensive testing for all kinds of interactive > content, which have differential treatment by the <label> element > relative to other elements. > > [1]: https://html.spec.whatwg.org/C/#the-tabindex-attribute > [2]: whatwg/html#5414 > > Fixed: 1065048 > Change-Id: I8deff810fead2c9170e18dd4d06dc642f68e6742 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2122369 > Commit-Queue: Timothy Gu <timothygu@chromium.org> > Reviewed-by: Kent Tamura <tkent@chromium.org> > Reviewed-by: Mason Freed <masonfreed@chromium.org> > Cr-Commit-Position: refs/heads/master@{#757590} Bug: 1065048 Change-Id: Ic32dbb9ac8eafb9b92a131fde71c5459029260e2 Fixed: 1069615 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2146089 Reviewed-by: Kent Tamura <tkent@chromium.org> Reviewed-by: Mason Freed <masonfreed@chromium.org> Commit-Queue: Timothy Gu <timothygu@chromium.org> Cr-Commit-Position: refs/heads/master@{#758568} -- wpt-commits: fec14c10a4b33d46e6d23de05037f4eee43394c5 wpt-pr: 22864
…bindex attribute as interactive content", a=testonly Automatic update from web-platform-tests Revert "Treat any HTML element with a tabindex attribute as interactive content" This reverts commit 7920b6e87ccb0640fc53ba264b6d1500325cb2f9. It turns out that this change is not web compatible. In addition to reverting the original change, we will seek to change the spec to reflect this web reality. Only the changes to Blink code are fully reverted. The tests are kept, but adapted to reflect this change. A comment update is also kept. Original change's description: > Treat any HTML element with a tabindex attribute as interactive content > > According to the HTML Standard [1]: > > > An element with the tabindex attribute specified is interactive > > content. > > In a subsequent review [2], this clause is reaffirmed by the editor of > HTML. Thus, we implement this accordingly. > > This commit also adds comprehensive testing for all kinds of interactive > content, which have differential treatment by the <label> element > relative to other elements. > > [1]: https://html.spec.whatwg.org/C/#the-tabindex-attribute > [2]: whatwg/html#5414 > > Fixed: 1065048 > Change-Id: I8deff810fead2c9170e18dd4d06dc642f68e6742 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2122369 > Commit-Queue: Timothy Gu <timothygu@chromium.org> > Reviewed-by: Kent Tamura <tkent@chromium.org> > Reviewed-by: Mason Freed <masonfreed@chromium.org> > Cr-Commit-Position: refs/heads/master@{#757590} Bug: 1065048 Change-Id: Ic32dbb9ac8eafb9b92a131fde71c5459029260e2 Fixed: 1069615 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2146089 Reviewed-by: Kent Tamura <tkent@chromium.org> Reviewed-by: Mason Freed <masonfreed@chromium.org> Commit-Queue: Timothy Gu <timothygu@chromium.org> Cr-Commit-Position: refs/heads/master@{#758568} -- wpt-commits: fec14c10a4b33d46e6d23de05037f4eee43394c5 wpt-pr: 22864
…bindex attribute as interactive content", a=testonly Automatic update from web-platform-tests Revert "Treat any HTML element with a tabindex attribute as interactive content" This reverts commit 7920b6e87ccb0640fc53ba264b6d1500325cb2f9. It turns out that this change is not web compatible. In addition to reverting the original change, we will seek to change the spec to reflect this web reality. Only the changes to Blink code are fully reverted. The tests are kept, but adapted to reflect this change. A comment update is also kept. Original change's description: > Treat any HTML element with a tabindex attribute as interactive content > > According to the HTML Standard [1]: > > > An element with the tabindex attribute specified is interactive > > content. > > In a subsequent review [2], this clause is reaffirmed by the editor of > HTML. Thus, we implement this accordingly. > > This commit also adds comprehensive testing for all kinds of interactive > content, which have differential treatment by the <label> element > relative to other elements. > > [1]: https://html.spec.whatwg.org/C/#the-tabindex-attribute > [2]: whatwg/html#5414 > > Fixed: 1065048 > Change-Id: I8deff810fead2c9170e18dd4d06dc642f68e6742 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2122369 > Commit-Queue: Timothy Gu <timothyguchromium.org> > Reviewed-by: Kent Tamura <tkentchromium.org> > Reviewed-by: Mason Freed <masonfreedchromium.org> > Cr-Commit-Position: refs/heads/master{#757590} Bug: 1065048 Change-Id: Ic32dbb9ac8eafb9b92a131fde71c5459029260e2 Fixed: 1069615 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2146089 Reviewed-by: Kent Tamura <tkentchromium.org> Reviewed-by: Mason Freed <masonfreedchromium.org> Commit-Queue: Timothy Gu <timothyguchromium.org> Cr-Commit-Position: refs/heads/master{#758568} -- wpt-commits: fec14c10a4b33d46e6d23de05037f4eee43394c5 wpt-pr: 22864 UltraBlame original commit: b007db21264da4facd5911993b956ec5c0f0196e
…bindex attribute as interactive content", a=testonly Automatic update from web-platform-tests Revert "Treat any HTML element with a tabindex attribute as interactive content" This reverts commit 7920b6e87ccb0640fc53ba264b6d1500325cb2f9. It turns out that this change is not web compatible. In addition to reverting the original change, we will seek to change the spec to reflect this web reality. Only the changes to Blink code are fully reverted. The tests are kept, but adapted to reflect this change. A comment update is also kept. Original change's description: > Treat any HTML element with a tabindex attribute as interactive content > > According to the HTML Standard [1]: > > > An element with the tabindex attribute specified is interactive > > content. > > In a subsequent review [2], this clause is reaffirmed by the editor of > HTML. Thus, we implement this accordingly. > > This commit also adds comprehensive testing for all kinds of interactive > content, which have differential treatment by the <label> element > relative to other elements. > > [1]: https://html.spec.whatwg.org/C/#the-tabindex-attribute > [2]: whatwg/html#5414 > > Fixed: 1065048 > Change-Id: I8deff810fead2c9170e18dd4d06dc642f68e6742 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2122369 > Commit-Queue: Timothy Gu <timothyguchromium.org> > Reviewed-by: Kent Tamura <tkentchromium.org> > Reviewed-by: Mason Freed <masonfreedchromium.org> > Cr-Commit-Position: refs/heads/master{#757590} Bug: 1065048 Change-Id: Ic32dbb9ac8eafb9b92a131fde71c5459029260e2 Fixed: 1069615 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2146089 Reviewed-by: Kent Tamura <tkentchromium.org> Reviewed-by: Mason Freed <masonfreedchromium.org> Commit-Queue: Timothy Gu <timothyguchromium.org> Cr-Commit-Position: refs/heads/master{#758568} -- wpt-commits: fec14c10a4b33d46e6d23de05037f4eee43394c5 wpt-pr: 22864 UltraBlame original commit: b007db21264da4facd5911993b956ec5c0f0196e
…bindex attribute as interactive content", a=testonly Automatic update from web-platform-tests Revert "Treat any HTML element with a tabindex attribute as interactive content" This reverts commit 7920b6e87ccb0640fc53ba264b6d1500325cb2f9. It turns out that this change is not web compatible. In addition to reverting the original change, we will seek to change the spec to reflect this web reality. Only the changes to Blink code are fully reverted. The tests are kept, but adapted to reflect this change. A comment update is also kept. Original change's description: > Treat any HTML element with a tabindex attribute as interactive content > > According to the HTML Standard [1]: > > > An element with the tabindex attribute specified is interactive > > content. > > In a subsequent review [2], this clause is reaffirmed by the editor of > HTML. Thus, we implement this accordingly. > > This commit also adds comprehensive testing for all kinds of interactive > content, which have differential treatment by the <label> element > relative to other elements. > > [1]: https://html.spec.whatwg.org/C/#the-tabindex-attribute > [2]: whatwg/html#5414 > > Fixed: 1065048 > Change-Id: I8deff810fead2c9170e18dd4d06dc642f68e6742 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2122369 > Commit-Queue: Timothy Gu <timothyguchromium.org> > Reviewed-by: Kent Tamura <tkentchromium.org> > Reviewed-by: Mason Freed <masonfreedchromium.org> > Cr-Commit-Position: refs/heads/master{#757590} Bug: 1065048 Change-Id: Ic32dbb9ac8eafb9b92a131fde71c5459029260e2 Fixed: 1069615 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2146089 Reviewed-by: Kent Tamura <tkentchromium.org> Reviewed-by: Mason Freed <masonfreedchromium.org> Commit-Queue: Timothy Gu <timothyguchromium.org> Cr-Commit-Position: refs/heads/master{#758568} -- wpt-commits: fec14c10a4b33d46e6d23de05037f4eee43394c5 wpt-pr: 22864 UltraBlame original commit: b007db21264da4facd5911993b956ec5c0f0196e
The commit doesn't reference a bug, but this is likely the bug it fixed: |
Having stepped through all instances of "interactive content", I come to the same conclusion. We could keep the content model the same by disallowing descendants with |
I have no strong preference on what we should do here. That said, though, here are comments:
I agree that sounds suboptimal and we should avoid it if we can. However, it seems like that’d only be a problem for spec editors and maybe conformance-checker maintainers — and not for web developers. So in light of the priority of constituencies, if were were to judge it to be better for web developers even though it was a maintenance inconsistency for spec authors, then we should go with what’s better for web developers. But regardless of that, I can’t say I have a good sense of what’s best for web devs in this case. I can say that I can’t remember the last time (if ever) that anybody reported a bug against the HTML checker saying they took exception to the existing error checker message about the spec’s current restrictions on nesting of interactive content. And as a general matter, pretty much nobody ever reports bugs against the checker saying that they want the checker to emit an error about something that it’s currently not already emitting an error for (that the spec doesn’t define as an error case). Similarly, in cases where the spec changes to make some case a non-error, and I change the checker to quit emitting an error for that case, no users ever complain about that error disappearing. In other words, the only time where we’re ever likely to see reactions from users of the HTML checker is when we introduce new restrictions (and so, new checker error messages).
I guess that’s the question which really matters — the question of what class of user problems we’re trying to help web developers avoid inadvertently causing.
That seems like something it’d be good to get written up regardless of how we resolve this issue. |
Thanks @sideshowbarker. So the current rules aren't annoying enough to make people report bugs on the checker, that seems like a useful data point. I suggest we keep the rules for links and buttons (by special casing |
Fixes #5414. What elements are considered interactive content is observable through label element retargeting behavior, and all major rendering engines do not consider tabindex for this purpose. In fact, considering tabindex would be a Web-incompatible change according to https://crbug.com/1065048. This does not change document conformance requirements, since the cases that would be affected now explicitly disallow elements with the tabindex attribute, in addition to disallowing interactive content.
The spec says that
This designation is observable and testable through the following clause that applies to
label
elements:However, it does not look like any browser actually considers
tabindex
interactive. With the following:clicking on "click me" prints "clicked" to the console in all browsers I tested (Chrome, Firefox, and the WebKit-based GNOME Web aka Epiphany). But if we were to click on the
details
element instead, then "clicked" does not get printed.Frankly, this could well be due to implementation negligence. WebKit and Chrome simply never implemented this, while in Firefox, the function
label
uses to check for interactive content opted out of thetabindex
-as-interactive behavior seemingly without too much thought. It wouldn't be too difficult to fix this in implementations.The question now is, is this behavior actually still something we want? This determines if we want to change the implementations or the spec.
The text was updated successfully, but these errors were encountered: