commit a6a0f8a2ed82ad78699125c7b0ca379514d60837
parent 8471c3bec1bedc0cad76b694a99670d992cba707
Author: Thomas Wisniewski <twisniewski@mozilla.com>
Date: Tue, 25 Nov 2025 14:09:14 +0000
Bug 1992050 - allow moz-box-button to be focusable; r=hjones
Differential Revision: https://phabricator.services.mozilla.com/D273028
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/browser/components/customizableui/PanelMultiView.sys.mjs b/browser/components/customizableui/PanelMultiView.sys.mjs
@@ -1595,6 +1595,7 @@ export var PanelView = class extends AssociatedToNode {
localName == "checkbox" ||
localName == "a" ||
localName == "moz-button" ||
+ localName == "moz-box-button" ||
localName == "moz-toggle" ||
node.classList.contains("text-link") ||
(!arrowKey && isNavigableWithTabOnly) ||
@@ -1921,7 +1922,10 @@ export var PanelView = class extends AssociatedToNode {
// a11y against the event target (moz-button) which fails. Dispatch from
// the inner button element instead.
let target = button;
- if (button.localName == "moz-button") {
+ if (
+ button.localName == "moz-button" ||
+ button.localName == "moz-box-button"
+ ) {
target = button.buttonEl;
details.composed = true;
}