Title: [186741] trunk
Revision
186741
Author
[email protected]
Date
2015-07-12 12:41:30 -0700 (Sun, 12 Jul 2015)

Log Message

AX: WEB: VoiceOver for iOS does not read <iframe> elements during linear (swipe) navigation.
https://bugs.webkit.org/show_bug.cgi?id=146861

Reviewed by Darin Adler.

Source/WebCore:

AttachmentViews exist only on WK1 so we need account for both platforms.

Test: platform/ios-simulator/accessibility/iframe-access.html

* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityElementAtIndex:]):

LayoutTests:

* platform/ios-simulator/accessibility/iframe-access-expected.txt: Added.
* platform/ios-simulator/accessibility/iframe-access.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (186740 => 186741)


--- trunk/LayoutTests/ChangeLog	2015-07-12 16:28:11 UTC (rev 186740)
+++ trunk/LayoutTests/ChangeLog	2015-07-12 19:41:30 UTC (rev 186741)
@@ -1,3 +1,13 @@
+2015-07-12  Chris Fleizach  <[email protected]>
+
+        AX: WEB: VoiceOver for iOS does not read <iframe> elements during linear (swipe) navigation.
+        https://bugs.webkit.org/show_bug.cgi?id=146861
+
+        Reviewed by Darin Adler.
+
+        * platform/ios-simulator/accessibility/iframe-access-expected.txt: Added.
+        * platform/ios-simulator/accessibility/iframe-access.html: Added.
+
 2015-07-11  Gyuyoung Kim  <[email protected]>
 
         [EFL] Unreviewed, EFL gardening on 12th Jul.

Added: trunk/LayoutTests/platform/ios-simulator/accessibility/iframe-access-expected.txt (0 => 186741)


--- trunk/LayoutTests/platform/ios-simulator/accessibility/iframe-access-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/ios-simulator/accessibility/iframe-access-expected.txt	2015-07-12 19:41:30 UTC (rev 186741)
@@ -0,0 +1,18 @@
+
+This makes sure that an iframe is accessible on iOS
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+AXIdentifier: content
+AXIdentifier: iframe
+AXIdentifier: 
+AXIdentifier: 
+AXIdentifier: 
+AXIdentifier: frame-button
+AXIdentifier: frame-link
+AXIdentifier: 
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/platform/ios-simulator/accessibility/iframe-access.html (0 => 186741)


--- trunk/LayoutTests/platform/ios-simulator/accessibility/iframe-access.html	                        (rev 0)
+++ trunk/LayoutTests/platform/ios-simulator/accessibility/iframe-access.html	2015-07-12 19:41:30 UTC (rev 186741)
@@ -0,0 +1,52 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+<script>
+var successfullyParsed = false;
+</script>
+</head>
+<body id="body">
+
+<div id="content">
+<iframe id="iframe" _onload_="startTest();" src="" id='frame-button'>Click me</button><a href='' id='frame-link'>a</a></body>"></iframe>
+</div>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+    description("This makes sure that an iframe is accessible on iOS");
+
+    function dumpAccessibilityChildren(element, level) {
+        if (!element) {
+            return;
+        }
+        var indent = "";
+        for (var k = 0; k < level; k++) { indent += "  "; }
+        debug(indent + element.identifier);
+        var childrenCount = element.childrenCount;
+        for (var k = 0; k < childrenCount; k++) {
+            dumpAccessibilityChildren(element.childAtIndex(k), level+1);
+        }
+    }
+
+    window.jsTestIsAsync = true;
+    function startTest() {
+
+        if (window.accessibilityController) {
+            // Dump the tree to confirm that the items inside the frame can be accessed.    
+            var content = accessibilityController.accessibleElementById("content");
+            dumpAccessibilityChildren(content);
+            finishJSTest();
+        }
+    }
+
+    successfullyParsed = true;
+</script>
+
+<script src=""
+</body>
+</html>
+

Modified: trunk/Source/WebCore/ChangeLog (186740 => 186741)


--- trunk/Source/WebCore/ChangeLog	2015-07-12 16:28:11 UTC (rev 186740)
+++ trunk/Source/WebCore/ChangeLog	2015-07-12 19:41:30 UTC (rev 186741)
@@ -1,3 +1,17 @@
+2015-07-12  Chris Fleizach  <[email protected]>
+
+        AX: WEB: VoiceOver for iOS does not read <iframe> elements during linear (swipe) navigation.
+        https://bugs.webkit.org/show_bug.cgi?id=146861
+
+        Reviewed by Darin Adler.
+
+        AttachmentViews exist only on WK1 so we need account for both platforms.
+
+        Test: platform/ios-simulator/accessibility/iframe-access.html
+
+        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
+        (-[WebAccessibilityObjectWrapper accessibilityElementAtIndex:]):
+
 2015-07-12  Youenn Fablet  <[email protected]>
 
         [Streams API] Templating ReadableJSStream

Modified: trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm (186740 => 186741)


--- trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm	2015-07-12 16:28:11 UTC (rev 186740)
+++ trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm	2015-07-12 19:41:30 UTC (rev 186741)
@@ -362,8 +362,10 @@
     if (![self _prepareAccessibilityCall])
         return 0;
 
-    if ([self isAttachment] && [self attachmentView])
-        return [[self attachmentView] accessibilityElementCount];
+    if ([self isAttachment]) {
+        if (id attachmentView = [self attachmentView])
+            return [attachmentView accessibilityElementCount];
+    }
     
     return m_object->children().size();
 }
@@ -373,8 +375,10 @@
     if (![self _prepareAccessibilityCall])
         return nil;
 
-    if ([self isAttachment] && [self attachmentView])
-        return [[self attachmentView] accessibilityElementAtIndex:index];
+    if ([self isAttachment]) {
+        if (id attachmentView = [self attachmentView])
+            return [attachmentView accessibilityElementAtIndex:index];
+    }
     
     const auto& children = m_object->children();
     size_t elementIndex = static_cast<size_t>(index);
@@ -382,8 +386,10 @@
         return nil;
     
     AccessibilityObjectWrapper* wrapper = children[elementIndex]->wrapper();
-    if (children[elementIndex]->isAttachment())
-        return [wrapper attachmentView];
+    if (children[elementIndex]->isAttachment()) {
+        if (id attachmentView = [wrapper attachmentView])
+            return attachmentView;
+    }
 
     return wrapper;
 }
@@ -393,8 +399,10 @@
     if (![self _prepareAccessibilityCall])
         return NSNotFound;
     
-    if ([self isAttachment] && [self attachmentView])
-        return [[self attachmentView] indexOfAccessibilityElement:element];
+    if ([self isAttachment]) {
+        if (id attachmentView = [self attachmentView])
+            return [attachmentView indexOfAccessibilityElement:element];
+    }
     
     const auto& children = m_object->children();
     unsigned count = children.size();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to