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

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

Issue 1156223002: Show human-readable names for accessibility properties (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: dmazzoni review comments Created 5 years, 7 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: Source/devtools/front_end/accessibility/AccessibilitySidebarView.js
diff --git a/Source/devtools/front_end/accessibility/AccessibilitySidebarView.js b/Source/devtools/front_end/accessibility/AccessibilitySidebarView.js
index f8cb2f41d72d5bed7da0682bee64d02e390ff352..e0579b37d039f0423331190e8bd237cfd9ec7924 100644
--- a/Source/devtools/front_end/accessibility/AccessibilitySidebarView.js
+++ b/Source/devtools/front_end/accessibility/AccessibilitySidebarView.js
@@ -204,7 +204,7 @@ WebInspector.AXComputedTextSubPane = function()
this._noTextInfo = this.createInfo(WebInspector.UIString("No computed text"));
this._noNodeInfo = this.createInfo(WebInspector.UIString("No accessibility node"));
- this._treeOutline = this.createTreeOutline("monospace");
+ this._treeOutline = this.createTreeOutline();
};
@@ -238,7 +238,7 @@ WebInspector.AXComputedTextSubPane.prototype = {
// TODO(aboxhall): include contents where appropriate (requires protocol change)
this._computedTextElement.classList.toggle("hidden", !axNode.name || !axNode.name.value);
if (axNode.name && axNode.name.value)
- this._computedTextElement.textContent = axNode.name.value;
+ this._computedTextElement.createChild("div").textContent = axNode.name.value;
var foundProperty = false;
/**
@@ -286,7 +286,7 @@ WebInspector.AXNodeSubPane = function()
this._noNodeInfo = this.createInfo(WebInspector.UIString("No accessibility node"));
this._ignoredInfo = this.createInfo(WebInspector.UIString("Accessibility node not exposed"), "ax-ignored-info hidden");
- this._treeOutline = this.createTreeOutline('monospace');
+ this._treeOutline = this.createTreeOutline();
this._ignoredReasonsTree = this.createTreeOutline();
};
@@ -451,11 +451,15 @@ WebInspector.AXNodePropertyTreeElement.populateWithNode = function(treeNode, axN
*/
WebInspector.AXNodePropertyTreeElement.createNameElement = function(name)
{
- var nameElement = createElementWithClass("span", "ax-name");
- if (/^\s|\s$|^$|\n/.test(name))
- nameElement.createTextChildren("\"", name.replace(/\n/g, "\u21B5"), "\"");
- else
+ var nameElement = createElement("span");
+ if (name in WebInspector.AXAttributes) {
+ nameElement.textContent = WebInspector.UIString(WebInspector.AXAttributes[name].name);
+ nameElement.title = WebInspector.UIString(WebInspector.AXAttributes[name].description);
+ nameElement.classList.add("ax-readable-name");
+ } else {
nameElement.textContent = name;
+ nameElement.classList.add("ax-name");
+ }
return nameElement;
}
@@ -488,7 +492,7 @@ WebInspector.AXNodePropertyTreeElement.createRelationshipValueElement = function
*/
WebInspector.AXNodePropertyTreeElement.createValueElement = function(value, parentElement)
{
- var valueElement = createElementWithClass("span", "object-value");
+ var valueElement = createElementWithClass("span", "monospace");
var type = value.type;
var prefix;
var valueText;

Powered by Google App Engine
This is Rietveld 408576698