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

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

Issue 2655393003: DevTools: Introduce ARIAUtils (Closed)
Patch Set: setAccessibleName in InspectorView 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 121478bf95565792d96d54cff2dc32dceaa4c9c3..08ef50bbef2df738949cd0d7ce0364edc52155df 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/Toolbar.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/Toolbar.js
@@ -607,6 +607,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);
}
/**
@@ -625,6 +626,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