Closed
Bug 1506503
Opened 4 years ago
Closed 4 years ago
PanelMultiView: Automatically focus the first item if a panel is opened via the keyboard
Categories
(Firefox :: Toolbars and Customization, enhancement, P1)
Firefox
Toolbars and Customization
Tracking
()
RESOLVED
FIXED
Firefox 65
Tracking | Status | |
---|---|---|
firefox65 | --- | fixed |
People
(Reporter: Jamie, Assigned: Jamie)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
We have specific code to focus the first item in the panel when the View site information (#identity-box) button is activated via the keyboard: https://searchfox.org/mozilla-central/source/browser/base/content/browser-siteIdentity.js#821 Currently, the identity panel is the only popup panel which can be opened from the keyboard. However, bug 1436086 will allow all toolbar buttons to be reached and activated with the keyboard, which includes buttons to open the Firefox menu, Library popup, Page Actions popup, etc. To work well for keyboard and screen reader users, all of these should focus the first item in the panel. These are all based on panelMultiView. The arguments passed to PanelMultiView.openPopup often include the event which triggered the popup. We can use this to detect keypress events and focus the first item for them.
Assignee | ||
Comment 1•4 years ago
|
||
Previously, we had specific code to do this for the "View site information" button (#identity-box) when activated via the keyboard. To work well for keyboard and screen reader users, all such popups (e.g. Firefox menu, Page Actions, etc.) should do this. These are all based on panelMultiView. The arguments passed to PanelMultiView.openPopup can include the event which triggered the popup. We now use this to detect keypress events and focus the first item in the panel in that case.
Assignee | ||
Comment 2•4 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=a4aeed2557d6cff52168652da974957a6298d287
Comment 3•4 years ago
|
||
I should point out that the current way these panels deal with focus has the disadvantage that it interferes with cut/copy/paste (because real focus moves, so the previously-focused text field and its selection state is unknown). I'm not sure if continuing in that direction and just accepting that this is broken is the best approach, or if we should rethink how the keyboard focus in these panels works. x-ref bug 1489974.
Updated•4 years ago
|
Priority: -- → P1
Pushed by jteh@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7949f2950122 PanelMultiView: Automatically focus the first item if a panel is opened via the keyboard. r=johannh,paolo
Comment 5•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/7949f2950122
Status: NEW → RESOLVED
Closed: 4 years ago
status-firefox65:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 65
You need to log in
before you can comment on or make changes to this bug.
Description
•