New issue
Advanced search Search tips

Issue 745305 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 651762



Sign in to add a comment

tabIndex IDL attribute of SUMMARY without DETAILS doesn't work correctly

Project Member Reported by tkent@chromium.org, Jul 18 2017

Issue description

Chrome Version: 61 Canary
OS: All but iOS

What steps will reproduce the problem?
(1) Open the following URL:
data:text/html;charset=utf-8,<summary tabindex=10><script>alert(document.querySelector('summary').tabIndex);</script>

What is the expected result?
A dialog shows "10".

What happens instead?
A dialog shows "-1".

Please use labels and text to provide additional information.

It's a bug of HTMLSummaryElement::SupportsFocus().
It should be |return HTMLElement::SupportsFocus() || IsMainSummary()|.


Firefox works correctly.  Safari has the same issue.

WPT: http://w3c-test.org/html/dom/reflection-misc.html

 

Comment 2 by tkent@chromium.org, Jul 27 2017

Owner: tkent@chromium.org
Status: Started (was: Available)
Project Member

Comment 3 by bugdroid1@chromium.org, Jul 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8b50c25a833f4cccaa3e22fb228e6e8c70690f5b

commit 8b50c25a833f4cccaa3e22fb228e6e8c70690f5b
Author: Kent Tamura <tkent@chromium.org>
Date: Fri Jul 28 05:21:35 2017

SUMMARY element: Enable focus with tabindex attribute.

<summary tabindex=N> should make it focusable. HTMLSummaryElement::
SupportsFocus() had a bug that it missed HTMLElement::SupportsFocus()
check.

Bug:  745305 
Change-Id: I0eaf17614950d8946152e153db67bc47b8a364f4
Reviewed-on: https://chromium-review.googlesource.com/588207
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: Takayoshi Kochi <kochi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490282}
[modify] https://crrev.com/8b50c25a833f4cccaa3e22fb228e6e8c70690f5b/third_party/WebKit/LayoutTests/external/wpt/html/dom/reflection-misc-expected.txt
[delete] https://crrev.com/abd4b2c0efc091e45c1460ff4c73e2e2bd0fe1ba/third_party/WebKit/LayoutTests/external/wpt/html/user-interaction/focus/tabindex-focus-flag-expected.txt
[modify] https://crrev.com/8b50c25a833f4cccaa3e22fb228e6e8c70690f5b/third_party/WebKit/Source/core/html/HTMLSummaryElement.cpp

Comment 4 by tkent@chromium.org, Jul 28 2017

Labels: M-62
Status: Fixed (was: Started)

Sign in to add a comment