Tabbing with the keyboard to focus into <embed>s does not work
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Tracking
()
People
(Reporter: twisniewski, Assigned: masayuki)
Details
Attachments
(3 files)
This is possible on Chromium and WebKit 176 (as of https://bugs.webkit.org/show_bug.cgi?id=259420 landing).
I'll attach WebKit's test-case, which makes the problem obvious when testing manually by tabbing multiple times to see if the embed's inputs get focus.
| Reporter | ||
Comment 1•2 years ago
|
||
Updated•2 years ago
|
| Assignee | ||
Comment 2•2 years ago
|
||
In HTMLEmbedElement::IsHTMLFocusable(), the default tab index is set to -1 because HTMLEmbedElement does not override TabIndexDefault() different from HTMLObjectElement.
| Assignee | ||
Comment 3•2 years ago
|
||
Hmm... <embed>.tabIndex should -1 by default different from <object>...
https://wpt.fyi/results/html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/tabindex-getter.html?label=master&label=experimental&aligned&q=%2Fhtml%2Finteraction%2Ffocus%2Fsequential-focus-navigation-and-the-tabindex-attribute%2Ftabindex-getter.html
| Assignee | ||
Comment 4•2 years ago
|
||
Like <object>, <embed> can load another document. However,
HTMLEmbedElement does not override Element::TabIndexDefault() and that
causes HTMLEmbedElement::IsHTMLFocusable() set the tab index to -1 so
it's skipped during the tab navigation.
| Assignee | ||
Comment 5•2 years ago
|
||
Okay, making <embed>.tabIndex return 0 only after loading a subdocument works.
Comment 7•2 years ago
|
||
| bugherder | ||
Updated•2 years ago
|
Reproducible on a 2023-08-10 Nightly build on Windows 10.
Verified as fixed on Firefox 118.0b3(20230831180026) and Nightly 119.0a1(20230831214652) on Windows 10, macOS 12, Ubuntu 22.
Description
•