Arrow keys and tab move focus incorrectly in Downloads panel
Categories
(Firefox :: Downloads Panel, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox97 | --- | verified |
People
(Reporter: Jamie, Assigned: enndeakin)
References
(Blocks 1 open bug, Regressed 1 open bug)
Details
(Keywords: access, Whiteboard: [fidefe-mr11-downloads])
Attachments
(1 file)
STR:
- Ensure you have at least two downloads in the Downloads panel.
- Open the Downloads panel.
- Press the up and down arrow keys.
- Expected: The download list items should get focus.
- Actual: Buttons get focus.
- Close the Downloads panel and open it again (to get focus onto a list item).
- Tab through the dialog.
- Expected: Only the buttons for the selected item should be reachable with tab.
- Actual: Tab moves through all the buttons for all items. Worse, the first tab stop is the first button for the first download, even if a subsequent item had focus.
This problem makes the Downloads panel completely unusable for screen reader users. Even though this isn't a regression (this bug has existed for years), with the increased spotlight on the Downloads panel, I think this needs to be fixed before we ship the new Downloads panel improvements.
Reporter | ||
Comment 1•3 years ago
|
||
(In reply to James Teh [:Jamie] from comment #0)
- Expected: Only the buttons for the selected item should be reachable with tab.
In case it's helpful, an example of where we get this right with a richlistbox is the Permissions list in Settings (#permissionsBox). Here's how we manage it.
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Comment 2•3 years ago
|
||
It looks like the general panel key navigation (in PanelMultiView.jsm) overrides the richlistbox key handling. Adding disablekeynav="true" to the panel makes the navigation in the list work ok.
I tried the suggestion in comment 1 and that works to handle the tab key navigating only to the button for the selected item.
However, the existing key handling interferes with the behaviour in several ways:
- the richlistbox is already focused when the panel opens, but code at https://searchfox.org/mozilla-central/rev/6a7c3a1eda4ebb8f9c13779dbbf5eff15bacf8ed/browser/components/downloads/content/downloads.js#443 handles the cursor or tab key being pressed in an unusual way, by changing the listbox selection but not changing the focus. I think this is being done to prevent the focus indicator from appearing at first?
- there is some special handling there as well to allow press cursor down to focus the footer row.
- there is no rendering done for the richlistbox selection at all when disablekeynav="true" is added. But when that is false, I think the panelmutiview key navigation might be used instead and the appearance only handles the mouse moving over the items. (which shouldn't really be changing the selection, is there a reason for this?)
Comment 3•3 years ago
|
||
(In reply to Neil Deakin from comment #2)
It looks like the general panel key navigation (in PanelMultiView.jsm) overrides the richlistbox key handling. Adding disablekeynav="true" to the panel makes the navigation in the list work ok.
I tried the suggestion in comment 1 and that works to handle the tab key navigating only to the button for the selected item.
However, the existing key handling interferes with the behaviour in several ways:
- the richlistbox is already focused when the panel opens, but code at https://searchfox.org/mozilla-central/rev/6a7c3a1eda4ebb8f9c13779dbbf5eff15bacf8ed/browser/components/downloads/content/downloads.js#443 handles the cursor or tab key being pressed in an unusual way, by changing the listbox selection but not changing the focus. I think this is being done to prevent the focus indicator from appearing at first?
I think the explanation is at https://searchfox.org/mozilla-central/rev/6a7c3a1eda4ebb8f9c13779dbbf5eff15bacf8ed/browser/components/downloads/content/downloads.js#32 .
- there is some special handling there as well to allow press cursor down to focus the footer row.
- there is no rendering done for the richlistbox selection at all when disablekeynav="true" is added. But when that is false, I think the panelmutiview key navigation might be used instead and the appearance only handles the mouse moving over the items. (which shouldn't really be changing the selection, is there a reason for this?)
We at least used to (unsure if this is still the case) support using keyboard shortcuts like 'del' to delete items, also when hovering items with the mouse. See in particular https://bugzilla.mozilla.org/show_bug.cgi?id=851519#c13 . So the aim was (is?) that if the user hovers an item and then hits delete, we delete the hovered item, not the default-focused item.
Assignee | ||
Comment 4•3 years ago
|
||
Updated•3 years ago
|
Assignee | ||
Comment 5•3 years ago
|
||
Comment on attachment 9254665 [details]
Bug 1742530, support key and tab navigation within the downloads panel list, r=mak
I think this patch gets us into a better state with keyboard navigation.
Cursor up/down navigates the list and footer, tab navigates between the list, the button for the selected item, and the footer.
Thoughts?
Reporter | ||
Comment 6•3 years ago
|
||
Comment on attachment 9254665 [details]
Bug 1742530, support key and tab navigation within the downloads panel list, r=mak
This is so, so much better. Thank you. Two things:
- I don't think the up/down arrow keys should wrap around. That is, if you're at the top of the list, up arrow shouldn't go to the bottom and vice versa. I realise the tab key wraps, but where that is conventional, wrapping in lists is not. (The user can always press home or end to quickly jump to the top or bottom, which I verified does work.)
- I was initially puzzled by down arrow moving to the footer, since it's not a list item and you can get there with tab. However, on reflection, I guess this makes it really obvious to a screen reader user that there are additional items to be seen elsewhere; they might not think to tab to find that button. I flag this just to say that it's unconventional, so there's always potential for confusion there, but I think the gains outweigh the potential downsides here.
f+ with the cursor wrapping removed.
Updated•3 years ago
|
Comment 9•3 years ago
|
||
bugherder |
Updated•3 years ago
|
Comment 10•3 years ago
|
||
Wanted to verify the fix on Firefox 97 beta 4 and these are the behaviors I'm seeing on a downloads panel where 5 downloads were made:
-
Pressing the Up key after opening the downloads panel only focuses the first top download. Navigation through the rest of the downloads is not done nor resumed (as it is the Open Application Menu) - please see the screencast.
-
Pressing the Down key after opening the downloads panel focuses directly the second top download. Navigation through the rest of the downloads stops when reaching "Show all downloads", it is not resumed as it is done in the Open Application Menu for example. - see the screencast.
-
Pressing the Tab key focuses the "Open in finder" button from the first top download and the "Show all downloads" button, jumps over the rest of the downloads. - please see the screencast.
Neil, are these behaviors intended?
Assignee | ||
Comment 11•3 years ago
|
||
- Pressing the Up key after opening the downloads panel only focuses the first top download. Navigation through the rest of the downloads is not done nor resumed (as it is the Open Application Menu) - please see the screencast.
Comment 6 implied that the navigation should not wrap around at the end.
- Pressing the Down key after opening the downloads panel focuses directly the second top download. Navigation through the rest of the downloads stops when reaching "Show all downloads", it is not resumed as it is done in the Open Application Menu for example. - see the screencast.
That probably should be cleaned up in some manner. I think the issue here is that the first item defaults to being selected when downloads is opened but no focus indicator of this is shown. So pressing down then moves to the second item.
- Pressing the Tab key focuses the "Open in finder" button from the first top download and the "Show all downloads" button, jumps over the rest of the downloads. - please see the screencast.
Pressing Tab should cycle between three things: 1. focus on the download list. 2. focus on the button for the selected row . 3. The footer 'show all downloads' button.
Comment 12•3 years ago
|
||
(In reply to Neil Deakin from comment #11)
- Pressing the Up key after opening the downloads panel only focuses the first top download. Navigation through the rest of the downloads is not done nor resumed (as it is the Open Application Menu) - please see the screencast.
Comment 6 implied that the navigation should not wrap around at the end.
Just to make sure I've drawn the right conclusion, pressing the Up arrow key should now focus on the first top download and not start from the end (starting from the "Show all downloads" and up) as it used to on FX 96, right?
- Pressing the Down key after opening the downloads panel focuses directly the second top download. Navigation through the rest of the downloads stops when reaching "Show all downloads", it is not resumed as it is done in the Open Application Menu for example. - see the screencast.
That probably should be cleaned up in some manner. I think the issue here is that the first item defaults to being selected when downloads is opened but no focus indicator of this is shown. So pressing down then moves to the second item.
Logged Bug 1751014 to cover this.
Updated•3 years ago
|
Assignee | ||
Comment 13•3 years ago
|
||
Just to make sure I've drawn the right conclusion, pressing the Up arrow key should now focus on the first top download and not start from the end (starting from the "Show all downloads" and up) as it used to on FX 96, right?
That is correct.
Comment 14•3 years ago
|
||
(In reply to Neil Deakin from comment #13)
Just to make sure I've drawn the right conclusion, pressing the Up arrow key should now focus on the first top download and not start from the end (starting from the "Show all downloads" and up) as it used to on FX 96, right?
That is correct.
Thanks, Neil for all the support!
Based on Comment 11, 12, and 13, marking this issue as Verified.
Updated•2 years ago
|
Description
•