https://bugs.webkit.org/show_bug.cgi?id=155600
Reviewed by Chris Fleizach.
Source/WebCore:
AXARIACurrent attribute was added to a temporary array that was never returned.
Test: accessibility/mac/aria-current-attribute-exposed.html
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
LayoutTests:
* accessibility/mac/aria-current-attribute-exposed-expected.txt: Added.
* accessibility/mac/aria-current-attribute-exposed.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@198427
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2016-03-18 Nan Wang <n_wang@apple.com>
+
+ AX: AXARIACurrent exposed but not displayed in Accessibility Inspector
+ https://bugs.webkit.org/show_bug.cgi?id=155600
+
+ Reviewed by Chris Fleizach.
+
+ * accessibility/mac/aria-current-attribute-exposed-expected.txt: Added.
+ * accessibility/mac/aria-current-attribute-exposed.html: Added.
+
2016-03-18 Nan Wang <n_wang@apple.com>
AX: Typing broken on form input field while using VoiceOver
--- /dev/null
+Link Current Link
+This tests that aria-current attribute is correctly exposed.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS link1.allAttributes().includes('AXARIACurrent: true') is false
+PASS link2.allAttributes().includes('AXARIACurrent: true') is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
--- /dev/null
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../resources/js-test-pre.js"></script>
+</head>
+<body>
+
+<div id="container">
+<a id="link1" href="/">Link</a>
+<a id="link2" aria-current="true" href="/">Current Link</a>
+</div>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+ description("This tests that aria-current attribute is correctly exposed.");
+
+ if (window.accessibilityController) {
+ var link1 = accessibilityController.accessibleElementById("link1");
+ var link2 = accessibilityController.accessibleElementById("link2");
+
+ // Attributes of link1 shouldn't contain AXARIACurrent
+ shouldBeFalse("link1.allAttributes().includes('AXARIACurrent: true')");
+ // Attributes of link2 should contain AXARIACurrent
+ shouldBeTrue("link2.allAttributes().includes('AXARIACurrent: true')");
+ }
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
+2016-03-18 Nan Wang <n_wang@apple.com>
+
+ AX: AXARIACurrent exposed but not displayed in Accessibility Inspector
+ https://bugs.webkit.org/show_bug.cgi?id=155600
+
+ Reviewed by Chris Fleizach.
+
+ AXARIACurrent attribute was added to a temporary array that was never returned.
+
+ Test: accessibility/mac/aria-current-attribute-exposed.html
+
+ * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+ (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
+
2016-03-18 Nan Wang <n_wang@apple.com>
AX: Typing broken on form input field while using VoiceOver
// Only expose AXARIACurrent attribute when the element is set to be current item.
if (m_object->ariaCurrentState() != ARIACurrentFalse)
- [objectAttributes arrayByAddingObjectsFromArray:@[ NSAccessibilityARIACurrentAttribute ]];
+ objectAttributes = [objectAttributes arrayByAddingObjectsFromArray:@[ NSAccessibilityARIACurrentAttribute ]];
return objectAttributes;
}