Bug 1439897 - Give the toolbox toolbar a proper role and label for accessibility, r?bgrins
MozReview-Commit-ID: 9Bc7RDNZ03m
--- 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" />