Bug 1226877 - make toolbox panels inaccessible with keyboard when they are hidden or collapsed. r=bgrins
authorYura Zenevich <yzenevich@mozilla.com>
Fri, 22 Jul 2016 15:00:57 -0400
changeset 331478 a5ee1d48d2f559ae0775463ae6cc7fee8119c3b1
parent 331477 b45c5745abc0cd63b8352465f4a1db907a423779
child 331479 2a2daf0beb006c6e2bcf4d20b0abbd26ac08608d
push id9858
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 14:37:10 +0000
treeherdermozilla-aurora@203106ef6cb6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbgrins
bugs1226877
milestone50.0a1
Bug 1226877 - make toolbox panels inaccessible with keyboard when they are hidden or collapsed. r=bgrins MozReview-Commit-ID: IEj81E2Y5wv
devtools/client/themes/toolbox.css
--- 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;
+}