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

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: Add test scaffolding and 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 7cf4c792867722f9aba44427d91411525035dda9..32515ae0cd7159476de6995ae001bbd841246afa 100644
--- a/third_party/WebKit/Source/devtools/front_end/accessibility/AccessibilitySidebarView.js
+++ b/third_party/WebKit/Source/devtools/front_end/accessibility/AccessibilitySidebarView.js
@@ -10,6 +10,7 @@ WebInspector.AccessibilitySidebarView = function()
{
WebInspector.ThrottledWidget.call(this);
this._axNodeSubPane = null;
+ this._ariaSubPane = null;
this._node = null;
this._sidebarPaneStack = null;
WebInspector.context.addFlavorChangeListener(WebInspector.DOMNode, this._pullNode, this);
@@ -40,12 +41,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
*/
@@ -59,9 +66,15 @@ WebInspector.AccessibilitySidebarView.prototype = {
this._axNodeSubPane.show(this.element);
this._axNodeSubPane.expandPane();
+ this._ariaSubPane = new WebInspector.ARIAAttributesPane();
+ this._ariaSubPane.setNode(this.node());
+ this._ariaSubPane.show(this.element);
+ this._ariaSubPane.expandPane();
+
this._sidebarPaneStack = new WebInspector.SidebarPaneStack();
this._sidebarPaneStack.element.classList.add("flex-auto");
this._sidebarPaneStack.show(this.element);
+ this._sidebarPaneStack.addPane(this._ariaSubPane);
this._sidebarPaneStack.addPane(this._axNodeSubPane);
}
@@ -87,6 +100,8 @@ WebInspector.AccessibilitySidebarView.prototype = {
this._node = WebInspector.context.flavor(WebInspector.DOMNode);
if (this._axNodeSubPane)
this._axNodeSubPane.setNode(this._node);
+ if (this._ariaSubPane)
+ this._ariaSubPane.setNode(this._node);
this.update();
},

Powered by Google App Engine
This is Rietveld 408576698