https://bugs.webkit.org/show_bug.cgi?id=160907
Reviewed by Joanmarie Diggs.
Source/WebCore:
Expose the expandedTextValue attribute for iOS, so that VoiceOver can speak abbreviations correctly.
Test: accessibility/ios-simulator/abbreviation.html
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper textMarkersForRange:]):
(-[WebAccessibilityObjectWrapper accessibilityExpandedTextValue]):
(-[WebAccessibilityObjectWrapper accessibilityIdentifier]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(AXAttributeStringSetSpelling):
(AXAttributeStringSetExpandedTextValue):
(AXAttributedStringAppendText):
(AXAttributeStringSetexpandedTextValue): Deleted.
Tools:
* DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::stringAttributeValue):
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::stringAttributeValue):
LayoutTests:
* accessibility/ios-simulator/abbreviation-expected.txt: Added.
* accessibility/ios-simulator/abbreviation.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204563
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2016-08-17 Chris Fleizach <cfleizach@apple.com>
+
+ AX: Support abbreviations in iOS
+ https://bugs.webkit.org/show_bug.cgi?id=160907
+
+ Reviewed by Joanmarie Diggs.
+
+ * accessibility/ios-simulator/abbreviation-expected.txt: Added.
+ * accessibility/ios-simulator/abbreviation.html: Added.
+
2016-08-16 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Don't throw touchMove events on the floor
--- /dev/null
+IRS
+This tests that expanded text values can be retrieved.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS text.description is 'AXLabel: IRS'
+PASS text.stringAttributeValue('AXExpandedTextValue') is 'Internal Revenue Service'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../resources/js-test-pre.js"></script>
+<script>
+var successfullyParsed = false;
+</script>
+</head>
+<body id="body">
+
+<abbr id="content" title='Internal Revenue Service'>IRS</abbr>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+ description("This tests that expanded text values can be retrieved.");
+
+ if (window.accessibilityController) {
+
+ var text = accessibilityController.accessibleElementById("content").childAtIndex(0);
+
+ shouldBe("text.description", "'AXLabel: IRS'");
+ shouldBe("text.stringAttributeValue('AXExpandedTextValue')", "'Internal Revenue Service'");
+ }
+
+ successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
+
+2016-08-17 Chris Fleizach <cfleizach@apple.com>
+
+ AX: Support abbreviations in iOS
+ https://bugs.webkit.org/show_bug.cgi?id=160907
+
+ Reviewed by Joanmarie Diggs.
+
+ Expose the expandedTextValue attribute for iOS, so that VoiceOver can speak abbreviations correctly.
+
+ Test: accessibility/ios-simulator/abbreviation.html
+
+ * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
+ (-[WebAccessibilityObjectWrapper textMarkersForRange:]):
+ (-[WebAccessibilityObjectWrapper accessibilityExpandedTextValue]):
+ (-[WebAccessibilityObjectWrapper accessibilityIdentifier]):
+ * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+ (AXAttributeStringSetSpelling):
+ (AXAttributeStringSetExpandedTextValue):
+ (AXAttributedStringAppendText):
+ (AXAttributeStringSetexpandedTextValue): Deleted.
+
2016-08-17 Antti Koivisto <antti@apple.com>
Remove StyleCachedImageSet
return [NSArray arrayWithObjects:start, end, nil];
}
+- (NSString *)accessibilityExpandedTextValue
+{
+ if (![self _prepareAccessibilityCall])
+ return nil;
+ return m_object->expandedTextValue();
+}
+
- (NSString *)accessibilityIdentifier
{
if (![self _prepareAccessibilityCall])
}
}
-static void AXAttributeStringSetexpandedTextValue(NSMutableAttributedString *attrString, RenderObject* renderer, NSRange range)
+static void AXAttributeStringSetExpandedTextValue(NSMutableAttributedString *attrString, RenderObject* renderer, NSRange range)
{
if (!renderer || !AXAttributedStringRangeIsValid(attrString, range))
return;
AXAttributeStringSetStyle(attrString, renderer, attrStringRange);
AXAttributeStringSetHeadingLevel(attrString, renderer, attrStringRange);
AXAttributeStringSetBlockquoteLevel(attrString, renderer, attrStringRange);
- AXAttributeStringSetexpandedTextValue(attrString, renderer, attrStringRange);
+ AXAttributeStringSetExpandedTextValue(attrString, renderer, attrStringRange);
AXAttributeStringSetElement(attrString, NSAccessibilityLinkTextAttribute, AccessibilityObject::anchorElementForNode(node), attrStringRange);
// do spelling last because it tends to break up the range
+2016-08-17 Chris Fleizach <cfleizach@apple.com>
+
+ AX: Support abbreviations in iOS
+ https://bugs.webkit.org/show_bug.cgi?id=160907
+
+ Reviewed by Joanmarie Diggs.
+
+ * DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
+ (AccessibilityUIElement::stringAttributeValue):
+ * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
+ (WTR::AccessibilityUIElement::stringAttributeValue):
+
2016-08-17 Gyuyoung Kim <gyuyoung.kim@navercorp.com>
[EFL] Bump efl version from 1.17 to 1.18
- (UIAccessibilityTraits)_axContainedByFieldsetTrait;
- (id)_accessibilityFieldsetAncestor;
- (BOOL)_accessibilityHasTouchEventListener;
+- (NSString *)accessibilityExpandedTextValue;
// TextMarker related
- (NSArray *)textMarkerRange;
if (JSStringIsEqualToUTF8CString(attribute, "AXARIACurrent"))
return [[m_element accessibilityARIACurrentStatus] createJSStringRef];
+
+ if (JSStringIsEqualToUTF8CString(attribute, "AXExpandedTextValue"))
+ return [[m_element accessibilityExpandedTextValue] createJSStringRef];
return JSStringCreateWithCharacters(0, 0);
}
- (UIAccessibilityTraits)_axContainedByFieldsetTrait;
- (id)_accessibilityFieldsetAncestor;
- (BOOL)_accessibilityHasTouchEventListener;
+- (NSString *)accessibilityExpandedTextValue;
// TextMarker related
- (NSArray *)textMarkerRange;
if (JSStringIsEqualToUTF8CString(attribute, "AXARIACurrent"))
return [[m_element accessibilityARIACurrentStatus] createJSStringRef];
-
+
+ if (JSStringIsEqualToUTF8CString(attribute, "AXExpandedTextValue"))
+ return [[m_element accessibilityExpandedTextValue] createJSStringRef];
+
return JSStringCreateWithCharacters(0, 0);
}