AX: VoiceOver cannot get to any content in Yahoo Mail messages table
authorcfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Jul 2015 07:31:27 +0000 (07:31 +0000)
committercfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Jul 2015 07:31:27 +0000 (07:31 +0000)
https://bugs.webkit.org/show_bug.cgi?id=146674

Reviewed by Darin Adler.

Source/WebCore:

A table row could have any number of parent elements in the render tree, but for the purposes
of accessibility we only want to report the AXTable as the parent so that it looks like a sane
data table.

Test: accessibility/aria-table-with-presentational-elements.html

* accessibility/AccessibilityARIAGridRow.cpp:
(WebCore::AccessibilityARIAGridRow::disclosedByRow):
(WebCore::AccessibilityARIAGridRow::parentObjectUnignored):
(WebCore::AccessibilityARIAGridRow::parentTable):
* accessibility/AccessibilityARIAGridRow.h:

LayoutTests:

* accessibility/aria-table-with-presentational-elements-expected.txt: Added.
* accessibility/aria-table-with-presentational-elements.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186587 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/accessibility/aria-table-with-presentational-elements-expected.txt [new file with mode: 0644]
LayoutTests/accessibility/aria-table-with-presentational-elements.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityARIAGridRow.cpp
Source/WebCore/accessibility/AccessibilityARIAGridRow.h

index 51f99bf..145c04b 100644 (file)
@@ -1,3 +1,13 @@
+2015-07-09  Chris Fleizach  <cfleizach@apple.com>
+
+        AX: VoiceOver cannot get to any content in Yahoo Mail messages table
+        https://bugs.webkit.org/show_bug.cgi?id=146674
+
+        Reviewed by Darin Adler.
+
+        * accessibility/aria-table-with-presentational-elements-expected.txt: Added.
+        * accessibility/aria-table-with-presentational-elements.html: Added.
+
 2015-07-08  Joseph Pecoraro  <pecoraro@apple.com>
 
         Fix grammar issue in TypeError attempting to change an unconfigurable property
diff --git a/LayoutTests/accessibility/aria-table-with-presentational-elements-expected.txt b/LayoutTests/accessibility/aria-table-with-presentational-elements-expected.txt
new file mode 100644 (file)
index 0000000..7ba8500
--- /dev/null
@@ -0,0 +1,11 @@
+This tests that in an aria table a row will report its parent as the table.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS row.role is 'AXRole: AXRow'
+PASS row.parentElement().role is 'AXRole: AXTable'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/accessibility/aria-table-with-presentational-elements.html b/LayoutTests/accessibility/aria-table-with-presentational-elements.html
new file mode 100644 (file)
index 0000000..55ad544
--- /dev/null
@@ -0,0 +1,43 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../resources/js-test-pre.js"></script>
+</head>
+
+<body id="body">
+
+<div id="content">
+
+<div role="grid" id="table">
+  <div role="presentational" aria-label="hello">
+     <div role="presentational" aria-haspopup="true">
+         <div role="row"> 
+             <div role="gridcell">hello</div>
+             <div role="gridcell">hello</div>
+             <div role="gridcell">hello</div>
+         </div>
+      </div>
+  </div>
+</div>
+
+</div>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+description("This tests that in an aria table a row will report its parent as the table.");
+
+if (window.accessibilityController) {
+    var table = accessibilityController.accessibleElementById("table");
+    var row = table.rowAtIndex(0);
+    shouldBe("row.role", "'AXRole: AXRow'");
+    shouldBe("row.parentElement().role", "'AXRole: AXTable'");
+
+    document.getElementById("content").style.visibility = "hidden";
+}
+
+</script>
+<script src="../resources/js-test-post.js"></script>
+</body>
+</html>
index c2aafaf..0b9f94c 100644 (file)
@@ -1,3 +1,22 @@
+2015-07-09  Chris Fleizach  <cfleizach@apple.com>
+
+        AX: VoiceOver cannot get to any content in Yahoo Mail messages table
+        https://bugs.webkit.org/show_bug.cgi?id=146674
+
+        Reviewed by Darin Adler.
+
+        A table row could have any number of parent elements in the render tree, but for the purposes
+        of accessibility we only want to report the AXTable as the parent so that it looks like a sane
+        data table.
+
+        Test: accessibility/aria-table-with-presentational-elements.html
+
+        * accessibility/AccessibilityARIAGridRow.cpp:
+        (WebCore::AccessibilityARIAGridRow::disclosedByRow):
+        (WebCore::AccessibilityARIAGridRow::parentObjectUnignored):
+        (WebCore::AccessibilityARIAGridRow::parentTable):
+        * accessibility/AccessibilityARIAGridRow.h:
+
 2015-07-08  Sungmann Cho  <sungmann.cho@navercorp.com>
 
         [GTK] The "Missing Plug-in" buttons are not showing up on some flash contents.
index 69ee525..dd4fda5 100644 (file)
@@ -114,6 +114,11 @@ AccessibilityObject* AccessibilityARIAGridRow::disclosedByRow() const
     return nullptr;
 }
     
+AccessibilityObject* AccessibilityARIAGridRow::parentObjectUnignored() const
+{
+    return parentTable();
+}
+    
 AccessibilityTable* AccessibilityARIAGridRow::parentTable() const
 {
     // The parent table might not be the direct ancestor of the row unfortunately. ARIA states that role="grid" should
index bf1a1c4..2d9ac29 100644 (file)
@@ -50,7 +50,8 @@ private:
 
     virtual bool isARIATreeGridRow() const override;
     virtual AccessibilityTable* parentTable() const override;
-}; 
+    virtual AccessibilityObject* parentObjectUnignored() const override;
+};
 
 } // namespace WebCore