Table caption skipped from tab navigation
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Tracking
()
People
(Reporter: stanio, Unassigned)
Details
Attachments
(1 file)
|
1.25 KB,
text/html
|
Details |
Table captions with a tabindex="0" attribute and/or focusable elements within table captions are skipped over when using Tab-navigation.
Additionally, one can focus a <caption tabindex="0"> or a focusable element within a caption using the mouse. Then performing forward (Tab) or backward (Shift+Tab) navigation skips over focusable elements within the table contents (cells).
The tab-navigation with focusable table caption works as expected in MS Edge, for example.
Comment 1•1 year ago
|
||
I can reproduce. Tabbing works as expected in Chromium and WebKit.
This is bad for accessibility (content is inaccessible for users who rely on tab navigation), though I don't know how common it is to have interactive content in caption.
| Reporter | ||
Comment 2•1 year ago
|
||
I've encountered it on a page of mine: https://stanio.github.io/mabels-mansion/
Updated•1 year ago
|
Comment 3•1 year ago
|
||
This looks like a behavior we have for a long while.
Masayuki, can you please take a look? There's a11y impact that concerns us. Thank you.
nsFocusManager::GetNextTabbableContent scans next/previous tabbable content with nsFrameItertoar. It first reach nsTableWrapperFrame, and goes into it, its descendants are nsTableFrame, nsTableRowGroupFrame... So, there is no frame for <caption> as a descendant of nsTableWrapperFrame. Instead, it's in nsTableWrapperFrame::mCaptionFrames. So, nsFrameIterator needs to dig into mCaptionFrames too. However, there is a problem, the visual order of the caption depends on its style. (Oh, fortunately, it's simplified? There is no left/right captions!).
So, we need to touch nsFrameIterator... (I wonder, isn't there an old bug about this??)
Updated•1 year ago
|
Description
•