Closed Bug 1960188 Opened 4 months ago Closed 4 months ago

Table caption skipped from tab navigation

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

defect

Tracking

()

RESOLVED DUPLICATE of bug 242829

People

(Reporter: stanio, Unassigned)

Details

Attachments

(1 file)

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.

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.

Severity: -- → S2

I've encountered it on a page of mine: https://stanio.github.io/mabels-mansion/

Flags: needinfo?(htsai)

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.

Flags: needinfo?(htsai) → needinfo?(masayuki)

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??)

Status: NEW → RESOLVED
Closed: 4 months ago
Duplicate of bug: 242829
Flags: needinfo?(masayuki)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: