AX: iOS: VoiceOver can't access attachments in mail messages
https://bugs.webkit.org/show_bug.cgi?id=158198

Reviewed by Joanmarie Diggs.

Source/WebCore:

Replaced elements, like attachemnts, were not being exposed in the attributed string returned to VoiceOver.
Make sure they are exposed with the attachment character, pointing to the actual element.

Test: accessibility/ios-simulator/attributed-string-for-range.html

* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(AccessibilityUnignoredAncestor):
(-[WebAccessibilityObjectWrapper _stringForRange:attributed:]):

Tools:

* DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::stringForRange):
(AccessibilityUIElement::attributedStringForRange):
(AccessibilityUIElement::attributedStringRangeIsMisspelled):
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::attributedStringForRange):
(WTR::AccessibilityUIElement::attributedStringRangeIsMisspelled):

LayoutTests:

* accessibility/ios-simulator/attributed-string-for-range.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@201568 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/accessibility/ios-simulator/attributed-string-for-range-expected.txt b/LayoutTests/accessibility/ios-simulator/attributed-string-for-range-expected.txt
new file mode 100644
index 0000000..fe77fa2
--- /dev/null
+++ b/LayoutTests/accessibility/ios-simulator/attributed-string-for-range-expected.txt
@@ -0,0 +1,27 @@
+hello     world
+This test ensures that attributed string for range works
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Attributed string: hello  {
+    UIAccessibilityTokenFontFamily = "Times New Roman";
+    UIAccessibilityTokenFontName = "Times New Roman";
+    UIAccessibilityTokenFontSize = 16;
+}{
+    UIAccessibilityTokenAttachment = "WebAccessibilityObjectWrapper: cake";
+}  {
+    UIAccessibilityTokenFontFamily = "Times New Roman";
+    UIAccessibilityTokenFontName = "Times New Roman";
+    UIAccessibilityTokenFontSize = 16;
+}{
+    UIAccessibilityTokenAttachment = "WebAccessibilityObjectWrapper: title, subtitle, action";
+} {
+    UIAccessibilityTokenFontFamily = "Times New Roman";
+    UIAccessibilityTokenFontName = "Times New Roman";
+    UIAccessibilityTokenFontSize = 16;
+}
+PASS successfullyParsed is true
+
+TEST COMPLETE
+