Bug 1226877 - make toolbox panels inaccessible with keyboard when they are hidden or collapsed. r=bgrins
MozReview-Commit-ID: GP8ATe45eSC
--- a/devtools/client/themes/toolbox.css
+++ b/devtools/client/themes/toolbox.css
@@ -377,9 +377,28 @@
.toolbox-panel {
display: -moz-box;
-moz-box-flex: 1;
visibility: collapse;
}
.toolbox-panel[selected] {
visibility: visible;
-}
\ No newline at end of file
+}
+
+/**
+ * When panels are collapsed or hidden, making sure that they are also
+ * inaccessible by keyboard. This is not the case by default because the are
+ * predominantly hidden using visibility: collapse; style or collapsed
+ * attribute.
+ */
+.toolbox-panel *,
+#toolbox-panel-webconsole[collapsed] * {
+ -moz-user-focus: ignore;
+}
+
+/**
+ * Enrure that selected toolbox panel's contents are keyboard accessible as they
+ * are explicitly made not to be when hidden (default).
+ */
+.toolbox-panel[selected] * {
+ -moz-user-focus: normal;
+}