[ATK] Expose aria-flowto through ATK_RELATION_FLOWS_TO
https://bugs.webkit.org/show_bug.cgi?id=127291
Reviewed by Mario Sanchez Prada.
Source/WebCore:
Test: accessibility/aria-flowto.html
Expose aria-flowto through ATK_RELATION_FLOWS_TO according to
http://www.w3.org/TR/wai-aria-implementation/#mapping_state-property
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(setAtkRelationSetFromCoreObject):
Tools:
Implemented AccessibilityUIElement::ariaFlowToElementAtIndex method.
* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(AccessibilityUIElement::ariaFlowToElementAtIndex):
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::ariaFlowToElementAtIndex):
LayoutTests:
Share aria-flowto.html with other ports. It passes on GTK and EFL.
* accessibility/aria-flowto-expected.txt: Renamed from LayoutTests/platform/mac/accessibility/aria-flowto-expected.txt.
* accessibility/aria-flowto.html: Renamed from LayoutTests/platform/mac/accessibility/aria-flowto.html.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162429 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp b/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp
index 305e233..3909dac 100644
--- a/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp
+++ b/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp
@@ -236,6 +236,15 @@
if (control)
atk_relation_set_add_relation_by_type(relationSet, ATK_RELATION_LABEL_FOR, control->wrapper());
}
+
+ // Check whether object supports aria-flowto
+ if (coreObject->supportsARIAFlowTo()) {
+ removeAtkRelationByType(relationSet, ATK_RELATION_FLOWS_TO);
+ AccessibilityObject::AccessibilityChildrenVector ariaFlowToElements;
+ coreObject->ariaFlowToElements(ariaFlowToElements);
+ for (const auto& accessibilityObject : ariaFlowToElements)
+ atk_relation_set_add_relation_by_type(relationSet, ATK_RELATION_FLOWS_TO, accessibilityObject->wrapper());
+ }
}
static gpointer webkitAccessibleParentClass = 0;