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

Unified Diff: third_party/WebKit/Source/devtools/front_end/accessibility/AccessibilitySidebarView.js

Issue 2058323002: Add ARIA panel to accessibility sidebar pane (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix test Created 4 years, 5 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/accessibility/AccessibilitySidebarView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/accessibility/AccessibilitySidebarView.js b/third_party/WebKit/Source/devtools/front_end/accessibility/AccessibilitySidebarView.js
index 25c78783bdc2e03f2ccc93c167822f16333698d1..90b49dd3cca1b07adfb2a9d8d48f6345c1b20f21 100644
--- a/third_party/WebKit/Source/devtools/front_end/accessibility/AccessibilitySidebarView.js
+++ b/third_party/WebKit/Source/devtools/front_end/accessibility/AccessibilitySidebarView.js
@@ -9,9 +9,10 @@
WebInspector.AccessibilitySidebarView = function()
{
WebInspector.ThrottledView.call(this, WebInspector.UIString("Accessibility"));
- this._axNodeSubPane = null;
this._node = null;
this._sidebarPaneStack = new WebInspector.View.ExpandableStackContainer();
+ this._ariaSubPane = new WebInspector.ARIAAttributesPane();
+ this._sidebarPaneStack.appendView(this._ariaSubPane, true);
this._axNodeSubPane = new WebInspector.AXNodeSubPane();
this._sidebarPaneStack.appendView(this._axNodeSubPane, true);
this._sidebarPaneStack.show(this.element);
@@ -43,12 +44,18 @@ WebInspector.AccessibilitySidebarView.prototype = {
{
if (this._axNodeSubPane)
this._axNodeSubPane.setAXNode(accessibilityNode);
+ this._accessibilityNodeUpdatedForTest();
}
var node = this.node();
return WebInspector.AccessibilityModel.fromTarget(node.target()).getAXNode(node.id)
.then(accessibilityNodeCallback.bind(this))
},
+ _accessibilityNodeUpdatedForTest: function()
+ {
+ // For sniffing in tests.
+ },
+
/**
* @override
*/
@@ -57,6 +64,7 @@ WebInspector.AccessibilitySidebarView.prototype = {
WebInspector.ThrottledView.prototype.wasShown.call(this);
this._axNodeSubPane.setNode(this.node());
+ this._ariaSubPane.setNode(this.node());
WebInspector.targetManager.addModelListener(WebInspector.DOMModel, WebInspector.DOMModel.Events.AttrModified, this._onAttrChange, this);
WebInspector.targetManager.addModelListener(WebInspector.DOMModel, WebInspector.DOMModel.Events.AttrRemoved, this._onAttrChange, this);
@@ -78,6 +86,7 @@ WebInspector.AccessibilitySidebarView.prototype = {
_pullNode: function()
{
this._node = WebInspector.context.flavor(WebInspector.DOMNode);
+ this._ariaSubPane.setNode(this._node);
this._axNodeSubPane.setNode(this._node);
this.update();
},

Powered by Google App Engine
This is Rietveld 408576698