Closed Bug 1773693 Opened 3 years ago Closed 4 months ago

Buttons with tabindex inside a table caption are not focused when using TAB key

Categories

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

Firefox 101
defect

Tracking

()

RESOLVED DUPLICATE of bug 242829

People

(Reporter: tmp4326, Unassigned)

Details

(Whiteboard: [platform-rel-Wikipedia] )

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0

Steps to reproduce:

Create a page with elements before and after a table (with a button inside caption)

Actual results:

Focus don´t work on button inside caption

Expected results:

Button inside caption should receive focus (accessibility problem)

The Bugbug bot thinks this bug should belong to the 'Core::Layout: Tables' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Layout: Tables
Product: Firefox → Core
Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true

https://searchfox.org/mozilla-central/rev/28ed523a3ed5dbf5f6b008cf1e28a9e8a8597b5e/dom/base/nsFocusManager.cpp#4174-4185 uses NS_NewFrameTraversal which doesn't look at the table caption frame list.

Olli, what do you think of switching the non-shadow DOM focus navigation to the same model as Shadow DOM?

Component: Layout: Tables → DOM: UI Events & Focus Handling
Flags: needinfo?(bugs)

I think we could try that. It is not as "good" as the frame based, but simpler and IIRC other browsers use that.

Flags: needinfo?(bugs)
Whiteboard: [platform-rel-Wikipedia]

This affects Wikipedia's collapsible tables. We used to use <a role="button" tabindex="0">, and have recently switched to using <button>. During the switch, this bug was discovered, however to our surprise it happened with the previous form as well (so unfortunately not a regression we could fix for Firefox by reverting back to <a>).

Live: https://en.wikipedia.org/wiki/Help:Collapsing

Isolated test case: https://codepen.io/Krinkle/pen/RwerqZZ

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

Attachment

General

Creator:
Created:
Updated:
Size: