Open Bug 1686694 Opened 4 years ago Updated 3 years ago

Downloads Panel keyboard navigation is broken


(Firefox :: Downloads Panel, defect, P3)





(Reporter: mak, Unassigned)


(Blocks 1 open bug, Regression)


(Keywords: regression)


(1 file)

IIRC, this used to work, but now it does nothing, differently from the Library and the hamburger menus that support it.

There are three regressions.
#1 focus ring is no longer indicated for whole row(or left column) of list, but It has focus.
#2 focus ring is no longer indicated for whole row(or left column), right column of list and footer, but It has focus.
#3 No longer focus left column of list(other than 1st row), so I cannot open downloaded file. And focus ring is no longer indicated for right column of list and footer, but It has focus.

#1 regression window:

Suspect: ba0ea459e2226f0ecc91f199809d5abb6a80de48 Paolo Amadini — Bug 1473521 - Load "richlistbox.css" as a document stylesheet. r=bgrins

#2 regression window:

Suspect: ?

#3 regression window:

Suspect: 2614ca0a8884a2995a59d07a59340d412450e4f2 Paolo Amadini — Bug 1452626 - Remove the "download" binding. r=mak,bgrins

Regressed by: 1452626, 1473521
Has Regression Range: --- → yes

Thank you, there are indeed various reasons for which this is broken and it's not so trivial to fix it.

First, this define is wrong:
#downloadsListBox:focus > @item@[selected]
#downloadsListBox:focus > #downloadsListBox > richlistitem[selected]
that is clearly bogus.

The keypress and keydown handlers that downloads.js add don't use mozSystemGroup, as such they are not invoked for navigation keys. Actually the keypress one is not invoked regardless. IIRC we changed keypress to be more Web compatible some time ago and we may have to switch to keydown. (bug 968056)

The worst issue is that I can't have the richlistbox take focus, it looks like the only thing that can take focus in the panel is the footer button. so the :focus css selector is never satisfied, and key events are always sent to the button.

The keyboard navigation style that we choose (focus ring) is also not coherent with the other toolbar panels that just move selection. The best path may be to rewrite from scratch the keyboard navigation in the panel. But we could also go with an initial brokeness fix and file a separate bug for the styling.

Neil, any idea why invoking focus() on the richlistbox in this panel seems to be ignored? document.activeElement seems to always be "downloadsFooterButtons". (I downloaded the 5MB test file from thinkbroadband multiple times, that actually fails in nightly due to mixed content, but still populate the list)

Flags: needinfo?(enndeakin)

My patch restores keyboard navigation in shape of focus rings and only on buttons. In practice up/down/tab already allow to move focus through the panel buttons, the patch just makes that visible and sets the richlistbox selection accordingly.
It is not the same selection style as the other panels, but it should do until the work on the downloads experience kicks-off.

It sounds like my previous question is not exactly correct, buttons in the panel can become the activeElement, it looks like in the past it was also possible to focus the RLB, but now it's not. Probably it doesn't matter much, the default action is still executed by activating buttons, and the contextual menu can still work for the other actions.

This still needs some kind of test checking the active element and the richlistbox selection, hopefully I can find some time for that in the next days.

Flags: needinfo?(enndeakin)
Assignee: nobody → mak
Points: --- → 3
See Also: → 1695383

not actively working on it now, my patch could be used as a starting point.

Assignee: mak → nobody
See Also: → 1742530
You need to log in before you can comment on or make changes to this bug.