New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 620488 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jul 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

<object> element and embedded documents not included in tab order

Reported by amelia.b...@gmail.com, Jun 15 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.84 Safari/537.36

Example URL:
http://codepen.io/AmeliaBR/pen/8713c723f84e1e637389a948a6c4d657?editors=1000

Steps to reproduce the problem:
1. Embed an interactive SVG or HTML document in a web page using an <object> element.
2. Try to reach the interactive content with the keyboard.
3. Test whether adding tabindex=0 to the <object> provides a way to access the embedded document.
4. Try to reach the <object> or the interactive content with the keyboard.
5. Despair.

(Or just check out the linked CodePen test case.)

What is the expected behavior?
The embedded document's tab order should be embedded in the parent document's tab order, the same as happens with an <iframe>.

What went wrong?
In Chrome 51, focus skips over the <object> completely when tabbing through the document.

If you transfer focus to the embedded document another way (e.g., click on the link, then reverse the navigation with the backspace key), you can still successfully tab *out* of that document and back into the parent document's tabindex.

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? Yes 

Chrome version: 51.0.2704.84  Channel: stable
OS Version: 10.0
Flash Version: Shockwave Flash 21.0 r0

I'm not 100% sure that this is a regression, but I'd like to think so.  Embedding interactive SVG via <object> is pretty standard, and I hope I would have noticed previously if it was completely inaccessible to keyboard users.

Firefox and Edge both allow the links in the embedded document to be reached by tabbing.  However, there are other browser inconsistencies: in Firefox, the <object> and <iframe> elements are added as tab stops, without the tabindex attribute; in Edge, the root <svg> element in the embedded document is a tab stop (a legacy of SVG 1.2 keyboard focus rules).  

PS, Possibly relevant bug on <object> and tabindex: https://bugs.chromium.org/p/chromium/issues/detail?id=531231 
But that's with respect to Flash objects, and the poster specifically says it wasn't a problem with HTML embeds.
 
Components: -Blink Blink>Focus

Comment 2 by kochi@chromium.org, Jun 30 2016

Owner: kochi@chromium.org
Status: Assigned (was: Unconfirmed)
I'll take a look next week.

Comment 3 by kochi@chromium.org, Jul 7 2016

Status: Started (was: Assigned)
Project Member

Comment 4 by bugdroid1@chromium.org, Jul 8 2016

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

commit a2c82afad86cf4f85f91df76f858434b15fe6b13
Author: kochi <kochi@chromium.org>
Date: Fri Jul 08 09:33:53 2016

Handle focusability for plugin elements which has browsing context

If <object> or <embed> has HTML/SVG contents,
focus navigation within documents under these
elements should work.

This has been working fine for <iframe>s.

The FocusController code checks for FrameOwnerElement,
which is parent of <iframe>, <object>, and <embed> if
it is isKeyboardFocusable() and has contentFrame().

HTMLPluginElement::isKeyboardFocsuable() didn't handle
the cases with HTML/SVG contents, only considered plugins.

BUG= 620488 

Review-Url: https://codereview.chromium.org/2129863002
Cr-Commit-Position: refs/heads/master@{#404324}

[add] https://crrev.com/a2c82afad86cf4f85f91df76f858434b15fe6b13/third_party/WebKit/LayoutTests/fast/dom/focus-navigation-in-plugin.html
[add] https://crrev.com/a2c82afad86cf4f85f91df76f858434b15fe6b13/third_party/WebKit/LayoutTests/fast/dom/resources/plugin-focus-subframe.html
[modify] https://crrev.com/a2c82afad86cf4f85f91df76f858434b15fe6b13/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.h
[modify] https://crrev.com/a2c82afad86cf4f85f91df76f858434b15fe6b13/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp

Comment 5 by kochi@chromium.org, Jul 8 2016

Status: Fixed (was: Started)
Components: Blink>HTML>Focus
Components: -Blink>Focus

Sign in to add a comment