Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(337)

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/Toolbar.js

Issue 2655393003: DevTools: Introduce ARIAUtils (Closed)
Patch Set: Use namespace instead of class Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/ui/Toolbar.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/Toolbar.js b/third_party/WebKit/Source/devtools/front_end/ui/Toolbar.js
index 8e6f552001bba2f712cf2fb3412318eddf459255..bb9796815163d4a6fec25c7e684aeed8f779706c 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/Toolbar.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/Toolbar.js
@@ -603,6 +603,7 @@ UI.ToolbarToggle = class extends UI.ToolbarButton {
this._untoggledGlyph = glyph;
this._toggledGlyph = toggledGlyph;
this.element.classList.add('toolbar-state-off');
+ UI.ARIAUtils.setPressed(this.element, false);
}
/**
@@ -621,6 +622,7 @@ UI.ToolbarToggle = class extends UI.ToolbarButton {
this._toggled = toggled;
this.element.classList.toggle('toolbar-state-on', toggled);
this.element.classList.toggle('toolbar-state-off', !toggled);
+ UI.ARIAUtils.setPressed(this.element, toggled);
if (this._toggledGlyph && this._untoggledGlyph)
this.setGlyph(toggled ? this._toggledGlyph : this._untoggledGlyph);
}

Powered by Google App Engine
This is Rietveld 408576698