Open Bug 1485335 Opened 7 years ago Updated 1 year ago

Keyboard navigation should follow DOM order by default, not frame tree order

Categories

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

defect

Tracking

()

People

(Reporter: MatsPalmgren_bugz, Unassigned)

References

Details

Keyboard navigation (tabbing) is incompatible with other UAs because nsFocusManager::GetNextTabbableContent traverses the frame tree rather than the DOM. For example: http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=6132 In Firefox you reach the <input> inside the <legend> first, in Chrome it's second.
Or we should fix the spec to have better behavior from user's point of view.
I agree that traversing <legend> (and <caption>?) first probably makes more sense from a user's POV (at least when it's placed on a logical start side), but the CSSWG explicitly decided that the CSS 'order' property shouldn't affect tabbing order (see bug 812687). So there's some precedent that box order shouldn't affect tabbing. This came up in https://github.com/whatwg/html/issues/3950#issuecomment-414974294 BTW, in case you want to argue for it there. It seems like an edge case though since focusable elements inside legend/caption are probably rare. So I don't feel that strongly about it as long as UAs are compatible and it appears other UAs use DOM order.
Priority: -- → P3
Component: Keyboard: Navigation → User events and focus handling
Severity: normal → S3
No longer blocks: 242829
Depends on: 242829
You need to log in before you can comment on or make changes to this bug.