Title: [89074] branches/safari-534-branch

Diff

Modified: branches/safari-534-branch/LayoutTests/ChangeLog (89073 => 89074)


--- branches/safari-534-branch/LayoutTests/ChangeLog	2011-06-16 22:08:11 UTC (rev 89073)
+++ branches/safari-534-branch/LayoutTests/ChangeLog	2011-06-16 22:10:58 UTC (rev 89074)
@@ -1,3 +1,17 @@
+2011-06-16  Lucas Forschler  <[email protected]>
+
+    Merged 88830.
+
+    2011-06-14  Chris Fleizach  <[email protected]>
+
+        Reviewed by David Kilzer.
+
+        VoiceOver cannot navigate the itunes album view table
+        https://bugs.webkit.org/show_bug.cgi?id=62335
+
+        * platform/mac/accessibility/aria-grid-with-strange-hierarchy-expected.txt: Added.
+        * platform/mac/accessibility/aria-grid-with-strange-hierarchy.html: Added.
+
 2011-06-14  Lucas Forschler  <[email protected]>
 
     Merged 88591.

Copied: branches/safari-534-branch/LayoutTests/platform/mac/accessibility/aria-grid-with-strange-hierarchy-expected.txt (from rev 88830, trunk/LayoutTests/platform/mac/accessibility/aria-grid-with-strange-hierarchy-expected.txt) (0 => 89074)


--- branches/safari-534-branch/LayoutTests/platform/mac/accessibility/aria-grid-with-strange-hierarchy-expected.txt	                        (rev 0)
+++ branches/safari-534-branch/LayoutTests/platform/mac/accessibility/aria-grid-with-strange-hierarchy-expected.txt	2011-06-16 22:10:58 UTC (rev 89074)
@@ -0,0 +1,19 @@
+ 	Name	Time	Popularity	 Price
+1	Test	Test	Test
+This tests that an ARIA grid with a hierarchy that ignores render elements in between will still expose the correct elements.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS grid.childrenCount is 6
+PASS grid.childAtIndex(0).role is 'AXRole: AXRow'
+PASS grid.childAtIndex(1).role is 'AXRole: AXColumn'
+PASS grid.childAtIndex(0).childrenCount is 4
+PASS grid.childAtIndex(0).childAtIndex(0).role is 'AXRole: AXCell'
+PASS grid.childAtIndex(0).childAtIndex(0).role is 'AXRole: AXCell'
+PASS grid.childAtIndex(0).childAtIndex(0).childAtIndex(0).role is 'AXRole: AXStaticText'
+PASS grid.childAtIndex(0).childAtIndex(0).childAtIndex(0).stringValue is 'AXValue: 1'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Copied: branches/safari-534-branch/LayoutTests/platform/mac/accessibility/aria-grid-with-strange-hierarchy.html (from rev 88830, trunk/LayoutTests/platform/mac/accessibility/aria-grid-with-strange-hierarchy.html) (0 => 89074)


--- branches/safari-534-branch/LayoutTests/platform/mac/accessibility/aria-grid-with-strange-hierarchy.html	                        (rev 0)
+++ branches/safari-534-branch/LayoutTests/platform/mac/accessibility/aria-grid-with-strange-hierarchy.html	2011-06-16 22:10:58 UTC (rev 89074)
@@ -0,0 +1,71 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href=""
+<script>
+var successfullyParsed = false;
+</script>
+<script src=""
+</head>
+<body id="body">
+
+<div tabindex=0 id="grid" role="grid" aria-readonly="true">
+<div  role="presentation">
+  <table role="presentation">
+          <thead>
+            <tr>
+                 <th role="columnheader" aria-sort="ascending">&nbsp;</th>
+                 <th role="columnheader">Name</th>
+                 <th role="columnheader">Time</th>
+                 <th role="columnheader">Popularity</th>
+                 <th role="columnheader"> Price</th>
+            </tr>
+          </thead>
+     
+    <tbody>
+    <tr role="row">
+        <td role="gridcell">
+          <span class="index"><span>1</span></span>
+        </td>
+        <td role="gridcell"">
+          <span><span>Test</span></span>
+        </td>
+        <td role="gridcell"">
+          <span><span>Test</span></span>
+        </td>
+        <td role="gridcell"">
+          <span><span>Test</span></span>
+        </td>
+    </tr>   
+</table></div></div>
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+    description("This tests that an ARIA grid with a hierarchy that ignores render elements in between will still expose the correct elements.");
+
+    if (window.accessibilityController) {
+
+          // this text field should be required.
+          document.getElementById("grid").focus();
+          var grid = accessibilityController.focusedElement;
+
+          shouldBe("grid.childrenCount", "6");
+          shouldBe("grid.childAtIndex(0).role", "'AXRole: AXRow'");
+          shouldBe("grid.childAtIndex(1).role", "'AXRole: AXColumn'");
+
+          shouldBe("grid.childAtIndex(0).childrenCount", "4");
+          shouldBe("grid.childAtIndex(0).childAtIndex(0).role", "'AXRole: AXCell'");
+
+          shouldBe("grid.childAtIndex(0).childAtIndex(0).role", "'AXRole: AXCell'");
+          shouldBe("grid.childAtIndex(0).childAtIndex(0).childAtIndex(0).role", "'AXRole: AXStaticText'");
+          shouldBe("grid.childAtIndex(0).childAtIndex(0).childAtIndex(0).stringValue", "'AXValue: 1'");
+
+    }
+    successfullyParsed = true;
+</script>
+
+<script src=""
+</body>
+</html>

Modified: branches/safari-534-branch/Source/WebCore/ChangeLog (89073 => 89074)


--- branches/safari-534-branch/Source/WebCore/ChangeLog	2011-06-16 22:08:11 UTC (rev 89073)
+++ branches/safari-534-branch/Source/WebCore/ChangeLog	2011-06-16 22:10:58 UTC (rev 89074)
@@ -1,3 +1,25 @@
+2011-06-16  Lucas Forschler  <[email protected]>
+
+    Merged 88830.
+
+    2011-06-14  Chris Fleizach  <[email protected]>
+
+        Reviewed by David Kilzer.
+
+        VoiceOver cannot navigate the iTunes album view table
+        https://bugs.webkit.org/show_bug.cgi?id=62335
+
+        This is a regression from https://bugs.webkit.org/show_bug.cgi?id=57463.
+        Part of that patch made a change so that an ARIA table will only look at it's children and grandchildren
+        for possible rows. That however, doesn't allow arbitrary hierarchies to work with ARIA, like in iTunes album view.
+
+        Test: platform/mac/accessibility/aria-grid-with-strange-hierarchy.html
+
+        * accessibility/AccessibilityARIAGrid.cpp:
+        (WebCore::AccessibilityARIAGrid::addChild):
+        (WebCore::AccessibilityARIAGrid::addChildren):
+        * accessibility/AccessibilityARIAGrid.h:
+
 2011-06-14  Lucas Forschler  <[email protected]>
 
     Merged 88833.

Modified: branches/safari-534-branch/Source/WebCore/accessibility/AccessibilityARIAGrid.cpp (89073 => 89074)


--- branches/safari-534-branch/Source/WebCore/accessibility/AccessibilityARIAGrid.cpp	2011-06-16 22:08:11 UTC (rev 89073)
+++ branches/safari-534-branch/Source/WebCore/accessibility/AccessibilityARIAGrid.cpp	2011-06-16 22:10:58 UTC (rev 89074)
@@ -59,14 +59,14 @@
     return adoptRef(new AccessibilityARIAGrid(renderer));
 }
 
-void AccessibilityARIAGrid::addChild(AccessibilityObject* child, HashSet<AccessibilityObject*>& appendedRows, unsigned& columnCount)
+bool AccessibilityARIAGrid::addChild(AccessibilityObject* child, HashSet<AccessibilityObject*>& appendedRows, unsigned& columnCount)
 {
     if (!child || !child->isTableRow() || child->ariaRoleAttribute() != RowRole)
-        return;
+        return false;
         
     AccessibilityTableRow* row = static_cast<AccessibilityTableRow*>(child);
     if (appendedRows.contains(row))
-        return;
+        return false;
         
     // store the maximum number of columns
     unsigned rowCellCount = row->children().size();
@@ -84,6 +84,7 @@
         m_children.append(row->children());
 
     appendedRows.add(row);
+    return true;
 }
     
 void AccessibilityARIAGrid::addChildren()
@@ -106,20 +107,18 @@
     unsigned columnCount = 0;
     for (RefPtr<AccessibilityObject> child = firstChild(); child; child = child->nextSibling()) {
 
-        if (child->isTableRow() || child->ariaRoleAttribute() == RowRole)
-            addChild(child.get(), appendedRows, columnCount);
-        else {
+        if (!addChild(child.get(), appendedRows, columnCount)) {
+            
             // in case the render tree doesn't match the expected ARIA hierarchy, look at the children
             if (!child->hasChildren())
                 child->addChildren();
 
-            // Do not navigate children through the Accessibility
-            // children vector to let addChild() check the result
-            // of accessibilityIsIgnored() and make the proper
-            // decision (add the objects or their children).
-            AccessibilityObject* grandChild = 0;
-            for (grandChild = child->firstChild(); grandChild; grandChild = grandChild->nextSibling())
-                addChild(grandChild, appendedRows, columnCount);
+            // The children of this non-row will contain all non-ignored elements (recursing to find them). 
+            // This allows the table to dive arbitrarily deep to find the rows.
+            AccessibilityChildrenVector children = child->children();
+            size_t length = children.size();
+            for (size_t i = 0; i < length; ++i)
+                addChild(children[i].get(), appendedRows, columnCount);
         }
     }
     

Modified: branches/safari-534-branch/Source/WebCore/accessibility/AccessibilityARIAGrid.h (89073 => 89074)


--- branches/safari-534-branch/Source/WebCore/accessibility/AccessibilityARIAGrid.h	2011-06-16 22:08:11 UTC (rev 89073)
+++ branches/safari-534-branch/Source/WebCore/accessibility/AccessibilityARIAGrid.h	2011-06-16 22:10:58 UTC (rev 89074)
@@ -55,7 +55,7 @@
     // ARIA treegrids and grids support selected rows.
     virtual bool supportsSelectedRows() { return true; }    
 
-    void addChild(AccessibilityObject*, HashSet<AccessibilityObject*>& appendedRows, unsigned& columnCount);
+    bool addChild(AccessibilityObject*, HashSet<AccessibilityObject*>& appendedRows, unsigned& columnCount);
 };
 
 } // namespace WebCore 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to