Title: [153002] trunk
Revision
153002
Author
[email protected]
Date
2013-07-22 15:04:23 -0700 (Mon, 22 Jul 2013)

Log Message

AX: VoiceOver only read the first column in a safari table
https://bugs.webkit.org/show_bug.cgi?id=118992

Reviewed by Tim Horton.

Source/WebCore: 

In case the first section has fewer columns than the rest of the table, the AXTable was only reporting the number of
columns for the first section. We need to take the max number of columns out of all sections.

Test: accessibility/table-with-mismatch-column-count-in-initial-section.html

* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::addChildren):

LayoutTests: 

* accessibility/table-with-mismatch-column-count-in-initial-section-expected.txt: Added.
* accessibility/table-with-mismatch-column-count-in-initial-section.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (153001 => 153002)


--- trunk/LayoutTests/ChangeLog	2013-07-22 21:59:11 UTC (rev 153001)
+++ trunk/LayoutTests/ChangeLog	2013-07-22 22:04:23 UTC (rev 153002)
@@ -1,3 +1,13 @@
+2013-07-22  Chris Fleizach  <[email protected]>
+
+        AX: VoiceOver only read the first column in a safari table
+        https://bugs.webkit.org/show_bug.cgi?id=118992
+
+        Reviewed by Tim Horton.
+
+        * accessibility/table-with-mismatch-column-count-in-initial-section-expected.txt: Added.
+        * accessibility/table-with-mismatch-column-count-in-initial-section.html: Added.
+
 2013-07-22  Beth Dakin  <[email protected]>
 
         StickyPositionContraints should not need to change to account for a RenderLayer's 

Added: trunk/LayoutTests/accessibility/table-with-mismatch-column-count-in-initial-section-expected.txt (0 => 153002)


--- trunk/LayoutTests/accessibility/table-with-mismatch-column-count-in-initial-section-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/accessibility/table-with-mismatch-column-count-in-initial-section-expected.txt	2013-07-22 22:04:23 UTC (rev 153002)
@@ -0,0 +1,13 @@
+Test
+Cell 1	Cell 2
+This tests that if a table's initial section has fewer columns than the rest of the table, we'll still detect the total column count correctly
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS table.columnCount is 2
+PASS cell.isEqual(accessibilityController.accessibleElementById('cell2')) is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/accessibility/table-with-mismatch-column-count-in-initial-section.html (0 => 153002)


--- trunk/LayoutTests/accessibility/table-with-mismatch-column-count-in-initial-section.html	                        (rev 0)
+++ trunk/LayoutTests/accessibility/table-with-mismatch-column-count-in-initial-section.html	2013-07-22 22:04:23 UTC (rev 153002)
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+</head>
+<body id="body">
+
+<table width="100%" border="0" cellspacing="2" cellpadding="1" summary="Test" id="table">
+  <caption>Test</caption>
+  <colgroup width="100%" span="2"><col width="50%"><col width="50%"></colgroup>
+  <tbody><tr><th>Cell 1</th><th id="cell2">Cell 2</th></tr></tbody>
+</table>
+  
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+    description("This tests that if a table's initial section has fewer columns than the rest of the table, we'll still detect the total column count correctly");
+
+    if (window.accessibilityController) {
+        var table = accessibilityController.accessibleElementById("table");
+        shouldBe("table.columnCount", "2");
+        var cell = table.cellForColumnAndRow(1, 0);
+        var cellCompare = accessibilityController.accessibleElementById('cell2');
+        shouldBeTrue("cell.isEqual(accessibilityController.accessibleElementById('cell2'))");
+    }
+
+</script>
+
+<script src=""
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (153001 => 153002)


--- trunk/Source/WebCore/ChangeLog	2013-07-22 21:59:11 UTC (rev 153001)
+++ trunk/Source/WebCore/ChangeLog	2013-07-22 22:04:23 UTC (rev 153002)
@@ -1,3 +1,18 @@
+2013-07-22  Chris Fleizach  <[email protected]>
+
+        AX: VoiceOver only read the first column in a safari table
+        https://bugs.webkit.org/show_bug.cgi?id=118992
+
+        Reviewed by Tim Horton.
+
+        In case the first section has fewer columns than the rest of the table, the AXTable was only reporting the number of
+        columns for the first section. We need to take the max number of columns out of all sections.
+
+        Test: accessibility/table-with-mismatch-column-count-in-initial-section.html
+
+        * accessibility/AccessibilityTable.cpp:
+        (WebCore::AccessibilityTable::addChildren):
+
 2013-07-22  Beth Dakin  <[email protected]>
 
         StickyPositionContraints should not need to change to account for a RenderLayer's 

Modified: trunk/Source/WebCore/accessibility/AccessibilityTable.cpp (153001 => 153002)


--- trunk/Source/WebCore/accessibility/AccessibilityTable.cpp	2013-07-22 21:59:11 UTC (rev 153001)
+++ trunk/Source/WebCore/accessibility/AccessibilityTable.cpp	2013-07-22 22:04:23 UTC (rev 153002)
@@ -350,7 +350,7 @@
     if (!tableSection)
         return;
     
-    RenderTableSection* initialTableSection = tableSection;
+    unsigned maxColumnCount = 0;
     while (tableSection) {
         
         HashSet<AccessibilityObject*> appendedRows;
@@ -382,11 +382,12 @@
             appendedRows.add(row);
         }
     
+        maxColumnCount = max(tableSection->numColumns(), maxColumnCount);
         tableSection = table->sectionBelow(tableSection, SkipEmptySections);
     }
     
     // make the columns based on the number of columns in the first body
-    unsigned length = initialTableSection->numColumns();
+    unsigned length = maxColumnCount;
     for (unsigned i = 0; i < length; ++i) {
         AccessibilityTableColumn* column = static_cast<AccessibilityTableColumn*>(axCache->getOrCreate(ColumnRole));
         column->setColumnIndex((int)i);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to