Bug 1439897 - Give the toolbox toolbar a proper role and label for accessibility, r?bgrins draft
authorMarco Zehe <mzehe@mozilla.com>
Fri, 23 Feb 2018 15:59:50 +0100
changeset 759437 74133683ab056f324d9ada3847e0eb92f43c82f2
parent 759436 1f44de15ffdb1c0ac9c2719efa2bbe12ea75d06b
push id100351
push usermzehe@mozilla.com
push dateSat, 24 Feb 2018 11:41:47 +0000
reviewersbgrins
bugs1439897
milestone60.0a1
Bug 1439897 - Give the toolbox toolbar a proper role and label for accessibility, r?bgrins MozReview-Commit-ID: 9Bc7RDNZ03m
devtools/client/framework/toolbox.js
devtools/client/framework/toolbox.xul
--- a/devtools/client/framework/toolbox.js
+++ b/devtools/client/framework/toolbox.js
@@ -500,16 +500,17 @@ Toolbox.prototype = {
       this._addReloadKeys();
       this._addHostListeners();
       this._registerOverlays();
       if (!this._hostOptions || this._hostOptions.zoom === true) {
         ZoomKeys.register(this.win);
       }
 
       this._componentMount.addEventListener("keypress", this._onToolbarArrowKeypress);
+      this._componentMount.setAttribute("aria-label", L10N.getStr("toolbox.label"));
 
       this.webconsolePanel = this.doc.querySelector("#toolbox-panel-webconsole");
       this.webconsolePanel.height = Services.prefs.getIntPref(SPLITCONSOLE_HEIGHT_PREF);
       this.webconsolePanel.addEventListener("resize", this._saveSplitConsoleHeight);
 
       let buttonsPromise = this._buildButtons();
 
       this._pingTelemetry();
--- a/devtools/client/framework/toolbox.xul
+++ b/devtools/client/framework/toolbox.xul
@@ -42,17 +42,18 @@
       <menuitem id="cMenu_delete"/>
       <menuseparator/>
       <menuitem id="cMenu_selectAll"/>
     </menupopup>
   </popupset>
 
   <vbox id="toolbox-container" flex="1">
     <div xmlns="http://www.w3.org/1999/xhtml" id="toolbox-notificationbox"/>
-    <div xmlns="http://www.w3.org/1999/xhtml" id="toolbox-toolbar-mount" />
+    <div xmlns="http://www.w3.org/1999/xhtml" id="toolbox-toolbar-mount"
+         role="toolbar" />
     <vbox flex="1" class="theme-body">
       <!-- Set large flex to allow the toolbox-panel-webconsole to have a
            height set to a small value without flexing to fill up extra
            space. There must be a flex on both to ensure that the console
            panel itself is sized properly -->
       <box id="toolbox-deck" flex="1000" minheight="75" />
       <splitter id="toolbox-console-splitter" class="devtools-horizontal-splitter" hidden="true" />
       <box minheight="75" flex="1" id="toolbox-panel-webconsole" collapsed="true" />