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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/accessibility/AccessibilityNodeView.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, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 * @extends {WebInspector.AccessibilitySubPane} 7 * @extends {WebInspector.AccessibilitySubPane}
8 */ 8 */
9 WebInspector.AXNodeSubPane = function() 9 WebInspector.AXNodeSubPane = function()
10 { 10 {
11 WebInspector.AccessibilitySubPane.call(this, WebInspector.UIString("Computed Properties")); 11 WebInspector.AccessibilitySubPane.call(this, WebInspector.UIString("Computed Properties"));
12 12
13 this._noNodeInfo = this.createInfo(WebInspector.UIString("No accessibility n ode")); 13 this._noNodeInfo = this.createInfo(WebInspector.UIString("No accessibility n ode"));
14 this._ignoredInfo = this.createInfo(WebInspector.UIString("Accessibility nod e not exposed"), "ax-ignored-info hidden"); 14 this._ignoredInfo = this.createInfo(WebInspector.UIString("Accessibility nod e not exposed"), "ax-ignored-info hidden");
15 15
16 this._treeOutline = this.createTreeOutline(); 16 this._treeOutline = this.createTreeOutline();
17 this._ignoredReasonsTree = this.createTreeOutline(); 17 this._ignoredReasonsTree = this.createTreeOutline();
18
19 this.element.classList.add("accessibility-computed");
18 }; 20 };
19 21
20 22
21 WebInspector.AXNodeSubPane.prototype = { 23 WebInspector.AXNodeSubPane.prototype = {
22 /** 24 /**
23 * @param {?AccessibilityAgent.AXNode} axNode 25 * @param {?AccessibilityAgent.AXNode} axNode
24 * @override 26 * @override
25 */ 27 */
26 setAXNode: function(axNode) 28 setAXNode: function(axNode)
27 { 29 {
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 100
99 for (var propertySet of [AccessibilityAgent.AXWidgetAttributes, Accessib ilityAgent.AXWidgetStates, AccessibilityAgent.AXGlobalStates, AccessibilityAgent .AXLiveRegionAttributes, AccessibilityAgent.AXRelationshipAttributes]) { 101 for (var propertySet of [AccessibilityAgent.AXWidgetAttributes, Accessib ilityAgent.AXWidgetStates, AccessibilityAgent.AXGlobalStates, AccessibilityAgent .AXLiveRegionAttributes, AccessibilityAgent.AXRelationshipAttributes]) {
100 for (var propertyKey in propertySet) { 102 for (var propertyKey in propertySet) {
101 var property = propertySet[propertyKey]; 103 var property = propertySet[propertyKey];
102 if (property in propertyMap) 104 if (property in propertyMap)
103 addProperty(propertyMap[property]); 105 addProperty(propertyMap[property]);
104 } 106 }
105 } 107 }
106 }, 108 },
107 109
110 /**
111 * @override
112 * @param {?WebInspector.DOMNode} node
113 */
114 setNode: function(node)
115 {
116 WebInspector.AccessibilitySubPane.prototype.setNode.call(this, node);
117 this._axNode = null;
118 },
119
108 __proto__: WebInspector.AccessibilitySubPane.prototype 120 __proto__: WebInspector.AccessibilitySubPane.prototype
109 }; 121 };
110 122
111 /** 123 /**
112 * @constructor 124 * @constructor
113 * @extends {TreeElement} 125 * @extends {TreeElement}
114 * @param {!WebInspector.Target} target 126 * @param {!WebInspector.Target} target
115 */ 127 */
116 WebInspector.AXNodePropertyTreeElement = function(target) 128 WebInspector.AXNodePropertyTreeElement = function(target)
117 { 129 {
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 reasonElement = WebInspector.formatLocalized("Static text node is used a s name for\u00a0", []); 688 reasonElement = WebInspector.formatLocalized("Static text node is used a s name for\u00a0", []);
677 break; 689 break;
678 case "uninteresting": 690 case "uninteresting":
679 reasonElement = WebInspector.formatLocalized("Element not interesting fo r accessibility.", []); 691 reasonElement = WebInspector.formatLocalized("Element not interesting fo r accessibility.", []);
680 break; 692 break;
681 } 693 }
682 if (reasonElement) 694 if (reasonElement)
683 reasonElement.classList.add("ax-reason"); 695 reasonElement.classList.add("ax-reason");
684 return reasonElement; 696 return reasonElement;
685 }; 697 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698