Closed Bug 461982 Opened 13 years ago Closed 13 years ago

focusable child does not appear in the tab order if its parent has a tabindex of 0 and it is the first child of the parent


(Core :: General, defect)

Not set





(Reporter: dotjay, Unassigned)




User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-GB; rv: Gecko/2008092414 Firefox/3.0.3
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-GB; rv: Gecko/2008092414 Firefox/3.0.3

If placed as the first child of any element that has tabindex="0" applied, a child that would normally appear in the tab order is skipped. For example, if you have <h1 tabindex="0"><a href="#">Link</a></h1> ... the h1 is in the tab order, but the link it completely skipped, so it cannot be accessed via keyboard.

When tabbing backwards through the page you can access the child that is skipped in the forwards direction. However, it is not possible to tab backwards from the parent element.

Reproducible: Always

Steps to Reproduce:
1. Set tabindex="0" on an element.
2. Place a hyperlink as the first child of that element.
3. Try to tab forwards and backwards through the page.
Actual Results:  
A. You cannot access the child element (the hyperlink) when tabbing forwards.
B. You cannot navigate back through the tab order from the parent element.

Expected Results:  
Should be able to access both parent and child in the forwards direction, and keyboard control should not be trapped.
Does this problem also happen on Windows and Linux?  In that case the "Platform" should be set to "All All".
Happens on Minefield trunk / Ubuntu Linux as well
And Camino 2.0a1 pre

I thought there was already a very similar bug filed, but I can't find it.
Component: Keyboard Navigation → General
OS: Mac OS X → All
Product: Firefox → Core
QA Contact: keyboard.navigation → general
Hardware: Macintosh → All
Just tested on Firefox 3.0.3 on Windows XP Pro SP 2 and observed the same bugs.

I too was fairly sure there were similar bugs filed, but could not find this specific bug filed. The most relevant bug I could find was:

And possibly related tabindex behaviour bugs:
Aaron Leventhal filed a related bug some time ago that also demonstrates tabindex-related keyboard trapping:
Depends on: 178324
This bug should have been fixed by 178324.
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.