Bug 977273 - Set aria-pressed state on Console filter buttons. r=robcee f=marcoz

This commit is contained in:
Athena 2014-07-07 19:55:00 +02:00
Родитель 4476e91d8c
Коммит f155f754c4
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -695,6 +695,7 @@ WebConsoleFrame.prototype = {
}, this); }, this);
aButton.setAttribute("checked", someChecked); aButton.setAttribute("checked", someChecked);
aButton.setAttribute("aria-pressed", someChecked);
}, this); }, this);
if (!this.owner._browserConsole) { if (!this.owner._browserConsole) {
@ -834,12 +835,14 @@ WebConsoleFrame.prototype = {
Array.forEach(buttons, (button) => { Array.forEach(buttons, (button) => {
if (button !== target) { if (button !== target) {
button.setAttribute("checked", false); button.setAttribute("checked", false);
button.setAttribute("aria-pressed", false);
this._setMenuState(button, false); this._setMenuState(button, false);
} }
}); });
state = true; state = true;
} }
target.setAttribute("checked", state); target.setAttribute("checked", state);
target.setAttribute("aria-pressed", state);
// This is a filter button with a drop-down, and the user clicked the // 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 // main part of the button. Go through all the severities and toggle
@ -888,6 +891,7 @@ WebConsoleFrame.prototype = {
} }
let toolbarButton = menuPopup.parentNode; let toolbarButton = menuPopup.parentNode;
toolbarButton.setAttribute("checked", someChecked); toolbarButton.setAttribute("checked", someChecked);
toolbarButton.setAttribute("aria-pressed", someChecked);
break; break;
} }
} }