From f155f754c4c6393e00a413760363bcbba1ab7749 Mon Sep 17 00:00:00 2001 From: Athena Date: Mon, 7 Jul 2014 19:55:00 +0200 Subject: [PATCH] Bug 977273 - Set aria-pressed state on Console filter buttons. r=robcee f=marcoz --- browser/devtools/webconsole/webconsole.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/browser/devtools/webconsole/webconsole.js b/browser/devtools/webconsole/webconsole.js index dd886383bd18..98755635ef4a 100644 --- a/browser/devtools/webconsole/webconsole.js +++ b/browser/devtools/webconsole/webconsole.js @@ -695,6 +695,7 @@ WebConsoleFrame.prototype = { }, this); aButton.setAttribute("checked", someChecked); + aButton.setAttribute("aria-pressed", someChecked); }, this); if (!this.owner._browserConsole) { @@ -834,12 +835,14 @@ WebConsoleFrame.prototype = { Array.forEach(buttons, (button) => { if (button !== target) { button.setAttribute("checked", false); + button.setAttribute("aria-pressed", false); this._setMenuState(button, false); } }); state = true; } target.setAttribute("checked", state); + target.setAttribute("aria-pressed", state); // This is a filter button with a drop-down, and the user clicked the // main part of the button. Go through all the severities and toggle @@ -888,6 +891,7 @@ WebConsoleFrame.prototype = { } let toolbarButton = menuPopup.parentNode; toolbarButton.setAttribute("checked", someChecked); + toolbarButton.setAttribute("aria-pressed", someChecked); break; } }