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/modules/accessibility/InspectorAccessibilityAgent.cpp

Issue 1435113003: Make use of new AX name calc in Chromium. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix issue with ariaTextAlternative Created 5 years, 1 month 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/modules/accessibility/InspectorAccessibilityAgent.cpp
diff --git a/third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp b/third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp
index 541b8df1a8fdf11abbdb03ada9772d5d18efbf64..f4a106880b83ae866d2255390a785460e11262fc 100644
--- a/third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp
@@ -40,11 +40,17 @@ namespace {
void fillCoreProperties(AXObject* axObject, PassRefPtr<AXNode> nodeObject)
{
- // core properties
- String description = axObject->deprecatedAccessibilityDescription();
+ // Description (secondary to the accessible name).
+ AXNameFrom nameFrom;
+ AXObject::AXObjectVector nameObjects;
+ axObject->name(nameFrom, &nameObjects);
+ AXDescriptionFrom descriptionFrom;
+ AXObject::AXObjectVector descriptionObjects;
+ String description = axObject->description(nameFrom, descriptionFrom, &descriptionObjects);
if (!description.isEmpty())
nodeObject->setDescription(createValue(description, AXValueType::ComputedString));
+ // Value.
if (axObject->supportsRangeValue()) {
nodeObject->setValue(createValue(axObject->valueForRange()));
} else {
@@ -52,10 +58,6 @@ void fillCoreProperties(AXObject* axObject, PassRefPtr<AXNode> nodeObject)
if (!stringValue.isEmpty())
nodeObject->setValue(createValue(stringValue));
}
-
- String help = axObject->deprecatedHelpText();
- if (!help.isEmpty())
- nodeObject->setHelp(createValue(help, AXValueType::ComputedString));
}
void fillLiveRegionProperties(AXObject* axObject, PassRefPtr<TypeBuilder::Array<AXProperty>> properties)
@@ -272,12 +274,12 @@ void fillRelationships(AXObject* axObject, PassRefPtr<TypeBuilder::Array<AXPrope
properties->addItem(createRelatedNodeListProperty(AXRelationshipAttributes::Controls, results, aria_controlsAttr, axObject));
results.clear();
- axObject->deprecatedAriaDescribedbyElements(results);
+ axObject->ariaDescribedbyElements(results);
if (!results.isEmpty())
properties->addItem(createRelatedNodeListProperty(AXRelationshipAttributes::Describedby, results, aria_describedbyAttr, axObject));
results.clear();
- axObject->deprecatedAriaLabelledbyElements(results);
+ axObject->ariaLabelledbyElements(results);
if (!results.isEmpty())
properties->addItem(createRelatedNodeListProperty(AXRelationshipAttributes::Labelledby, results, aria_labelledbyAttr, axObject));
results.clear();

Powered by Google App Engine
This is Rietveld 408576698