https://bugs.webkit.org/show_bug.cgi?id=148458
Patch by Nan Wang <n_wang@apple.com> on 2015-08-25
Reviewed by Chris Fleizach.
Source/WebCore:
Re-enabled accessibility/aria-controls.html test for mac.
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
Tools:
Implemented ariaControlsElementAtIndex(unsigned index).
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::ariaControlsElementAtIndex):
(AccessibilityUIElement::disclosedRowAtIndex):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::ariaControlsElementAtIndex):
LayoutTests:
* accessibility/aria-controls.html:
* platform/mac/TestExpectations:
* platform/mac/accessibility/aria-controls-expected.txt: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188947
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2015-08-25 Nan Wang <n_wang@apple.com>
+
+ AX: Enable accessibility/aria-controls.html test for mac
+ https://bugs.webkit.org/show_bug.cgi?id=148458
+
+ Reviewed by Chris Fleizach.
+
+ * accessibility/aria-controls.html:
+ * platform/mac/TestExpectations:
+ * platform/mac/accessibility/aria-controls-expected.txt: Added.
+
2015-08-25 Myles C. Maxfield <mmaxfield@apple.com>
More test gardening of css3/line-break-language-sensitive.
var tablist = accessibilityController.accessibleElementById("tablist");
var tab1 = tablist.childAtIndex(0);
- shouldBe("tab1.ariaControlsElementAtIndex(0).stringValue", "'AXValue: Panel 1'");
- shouldBe("tab1.ariaControlsElementAtIndex(1).stringValue", "'AXValue: Panel 2'");
+ if (accessibilityController.platformName == "mac") {
+ shouldBe("tab1.ariaControlsElementAtIndex(0).childAtIndex(0).stringValue", "'AXValue: Panel 1'");
+ shouldBe("tab1.ariaControlsElementAtIndex(1).childAtIndex(0).stringValue", "'AXValue: Panel 2'");
+ } else {
+ shouldBe("tab1.ariaControlsElementAtIndex(0).stringValue", "'AXValue: Panel 1'");
+ shouldBe("tab1.ariaControlsElementAtIndex(1).stringValue", "'AXValue: Panel 2'");
+ }
}
</script>
# Missing implementation of some functions in mac.
webkit.org/b/129039 accessibility/select-element-at-index.html [ Skip ]
-# ariaControlsElementAtIndex is not implemented in mac
-webkit.org/b/127908 accessibility/aria-controls.html [ Skip ]
-
# Need to add functionality to DumpRenderTree to handle error pages
fast/history/back-forward-reset-after-error-handling.html
--- /dev/null
+Panel 1
+Panel 2
+This tests that aria-controls returns correct element at the given index
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS tab1.ariaControlsElementAtIndex(0).childAtIndex(0).stringValue is 'AXValue: Panel 1'
+PASS tab1.ariaControlsElementAtIndex(1).childAtIndex(0).stringValue is 'AXValue: Panel 2'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
+2015-08-25 Nan Wang <n_wang@apple.com>
+
+ AX: Enable accessibility/aria-controls.html test for mac
+ https://bugs.webkit.org/show_bug.cgi?id=148458
+
+ Reviewed by Chris Fleizach.
+
+ Re-enabled accessibility/aria-controls.html test for mac.
+
+ * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+ (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
+
2015-08-25 Zalan Bujtas <zalan@apple.com>
Using the filter functional notation for background images results in wrong background-size rendering
#define NSAccessibilityDocumentEncodingAttribute @"AXDocumentEncoding"
#endif
+#ifndef NSAccessibilityAriaControlsAttribute
+#define NSAccessibilityAriaControlsAttribute @"AXARIAControls"
+#endif
+
#define NSAccessibilityDOMIdentifierAttribute @"AXDOMIdentifier"
#define NSAccessibilityDOMClassListAttribute @"AXDOMClassList"
return nil;
}
+ // Aria controls element
+ if ([attributeName isEqualToString:NSAccessibilityAriaControlsAttribute]) {
+ AccessibilityObject::AccessibilityChildrenVector ariaControls;
+ m_object->ariaControlsElements(ariaControls);
+ return convertToNSArray(ariaControls);
+ }
+
return nil;
}
+2015-08-25 Nan Wang <n_wang@apple.com>
+
+ AX: Enable accessibility/aria-controls.html test for mac
+ https://bugs.webkit.org/show_bug.cgi?id=148458
+
+ Reviewed by Chris Fleizach.
+
+ Implemented ariaControlsElementAtIndex(unsigned index).
+
+ * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+ (AccessibilityUIElement::ariaControlsElementAtIndex):
+ (AccessibilityUIElement::disclosedRowAtIndex):
+ * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
+ (WTR::AccessibilityUIElement::ariaControlsElementAtIndex):
+
2015-08-25 Gyuyoung Kim <gyuyoung.kim@webkit.org>
Remove python tests for PassRefPtr
AccessibilityUIElement AccessibilityUIElement::ariaControlsElementAtIndex(unsigned index)
{
- // FIXME: implement
- return 0;
+ BEGIN_AX_OBJC_EXCEPTIONS
+ NSArray* ariaControls = [m_element accessibilityAttributeValue:@"AXARIAControls"];
+ if (index < [ariaControls count])
+ return [ariaControls objectAtIndex:index];
+ END_AX_OBJC_EXCEPTIONS
+
+ return nullptr;
}
AccessibilityUIElement AccessibilityUIElement::disclosedRowAtIndex(unsigned index)
PassRefPtr<AccessibilityUIElement> AccessibilityUIElement::ariaControlsElementAtIndex(unsigned index)
{
- // FIXME: implement
+ BEGIN_AX_OBJC_EXCEPTIONS
+ NSArray* ariaControls = [m_element accessibilityAttributeValue:@"AXARIAControls"];
+ if (index < [ariaControls count])
+ return AccessibilityUIElement::create([ariaControls objectAtIndex:index]);
+ END_AX_OBJC_EXCEPTIONS
return nullptr;
}