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

Unified Diff: third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp

Issue 2967193003: Relation list properties for Accessibility Object Model phase 1 (Closed)
Patch Set: Created 3 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/modules/accessibility/AXLayoutObject.cpp
diff --git a/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp b/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp
index c890377e81ec60b3b833bddab499302d89dd6a8a..1ea00563ed6fb0b2691425b5ed2cf3c570917f04 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp
@@ -1258,16 +1258,18 @@ String AXLayoutObject::TextAlternative(bool recursive,
//
void AXLayoutObject::AriaOwnsElements(AXObjectVector& owns) const {
- AccessibilityChildrenFromAttribute(aria_ownsAttr, owns);
+ AccessibilityChildrenFromAOMProperty(AOMRelationListProperty::kOwns, owns);
}
void AXLayoutObject::AriaDescribedbyElements(
AXObjectVector& describedby) const {
- AccessibilityChildrenFromAttribute(aria_describedbyAttr, describedby);
+ AccessibilityChildrenFromAOMProperty(AOMRelationListProperty::kDescribedBy,
+ describedby);
}
void AXLayoutObject::AriaLabelledbyElements(AXObjectVector& labelledby) const {
- AccessibilityChildrenFromAttribute(aria_labelledbyAttr, labelledby);
+ AccessibilityChildrenFromAOMProperty(AOMRelationListProperty::kLabeledBy,
+ labelledby);
}
bool AXLayoutObject::AriaHasPopup() const {
@@ -2251,7 +2253,9 @@ bool AXLayoutObject::IsTabItemSelected() const {
return false;
HeapVector<Member<Element>> elements;
- ElementsFromAttribute(elements, aria_controlsAttr);
+ if (!HasAOMPropertyOrARIAAttribute(AOMRelationListProperty::kControls,
+ elements))
+ return false;
for (const auto& element : elements) {
AXObject* tab_panel = AxObjectCache().GetOrCreate(element);

Powered by Google App Engine
This is Rietveld 408576698