Bug 1454866 part 1: PanelMultiView: Provide a way to allow keyboard navigation to an element without affecting visual presentation. r?johannh
PanelMultiView has specific code to support keyboard navigation.
However, it only includes elements with class subviewbutton, which has visual styling.
Some views have controls which should be included in keyboard navigation, but for which the subviewbutton styling is not appropriate.
Therefore, also include elements with the new class subviewkeynav, which is specific to keyboard navigation and has no visual styling.
MozReview-Commit-ID: 8A5q9nbGpdc
--- a/browser/components/customizableui/PanelMultiView.jsm
+++ b/browser/components/customizableui/PanelMultiView.jsm
@@ -1361,17 +1361,18 @@ var PanelView = class extends Associated
/**
* Retrieves the button elements that can be used for navigation using the
* keyboard, that is all enabled buttons including the back button if visible.
*
* @return {Array}
*/
getNavigableElements() {
- let buttons = Array.from(this.node.querySelectorAll(".subviewbutton:not([disabled])"));
+ let buttons = Array.from(this.node.querySelectorAll(
+ ".subviewbutton:not([disabled]), .subviewkeynav:not([disabled])"));
let dwu = this._dwu;
return buttons.filter(button => {
let bounds = dwu.getBoundsWithoutFlushing(button);
return bounds.width > 0 && bounds.height > 0;
});
}
/**