Title: [167559] trunk
Revision
167559
Author
[email protected]
Date
2014-04-19 18:38:48 -0700 (Sat, 19 Apr 2014)

Log Message

AX: grid rows are not recognized do to lack of explicit role="row", role="gridcell"
https://bugs.webkit.org/show_bug.cgi?id=131819

Reviewed by Darin Adler.

Source/WebCore: 
Test: accessibility/table-with-missing-aria-role-rows.html

If a table is using role="grid", and it has <tr> elements that do not have
role="row", we should still treat them as row elements.

* accessibility/AccessibilityARIAGrid.cpp:
(WebCore::AccessibilityARIAGrid::addTableCellChild):

LayoutTests: 
* accessibility/table-with-missing-aria-role-rows-expected.txt: Added.
* accessibility/table-with-missing-aria-role-rows.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (167558 => 167559)


--- trunk/LayoutTests/ChangeLog	2014-04-20 01:25:28 UTC (rev 167558)
+++ trunk/LayoutTests/ChangeLog	2014-04-20 01:38:48 UTC (rev 167559)
@@ -1,5 +1,15 @@
 2014-04-19  Chris Fleizach  <[email protected]>
 
+        AX: grid rows are not recognized do to lack of explicit role="row", role="gridcell"
+        https://bugs.webkit.org/show_bug.cgi?id=131819
+
+        Reviewed by Darin Adler.
+
+        * accessibility/table-with-missing-aria-role-rows-expected.txt: Added.
+        * accessibility/table-with-missing-aria-role-rows.html: Added.
+
+2014-04-19  Chris Fleizach  <[email protected]>
+
         AX: Malformed tables exposing incorrect col and colSpans
         https://bugs.webkit.org/show_bug.cgi?id=131796
 

Added: trunk/LayoutTests/accessibility/table-with-missing-aria-role-rows-expected.txt (0 => 167559)


--- trunk/LayoutTests/accessibility/table-with-missing-aria-role-rows-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/accessibility/table-with-missing-aria-role-rows-expected.txt	2014-04-20 01:38:48 UTC (rev 167559)
@@ -0,0 +1,13 @@
+a	b
+a	b
+This tests if a table uses the grid role, but forgets to add role='row' or role='gridcell' to native tr/td elements, it still exposes the right numbers of rows/cells.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS table.rowCount is 2
+PASS table.columnCount is 2
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/accessibility/table-with-missing-aria-role-rows.html (0 => 167559)


--- trunk/LayoutTests/accessibility/table-with-missing-aria-role-rows.html	                        (rev 0)
+++ trunk/LayoutTests/accessibility/table-with-missing-aria-role-rows.html	2014-04-20 01:38:48 UTC (rev 167559)
@@ -0,0 +1,31 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+</head>
+<body id="body">
+
+<table role="grid" id="table">
+<tr role="row"><td role="gridcell">a</td><td>b</td></tr>
+<tr><td role="gridcell">a</td><td>b</td></tr>
+</table>
+
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+    description("This tests if a table uses the grid role, but forgets to add role='row' or role='gridcell' to native tr/td elements, it still exposes the right numbers of rows/cells.");
+
+    if (window.accessibilityController) {
+        var table = accessibilityController.accessibleElementById("table");
+        shouldBe("table.rowCount", "2");
+        shouldBe("table.columnCount", "2");
+    }
+
+</script>
+
+<script src=""
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (167558 => 167559)


--- trunk/Source/WebCore/ChangeLog	2014-04-20 01:25:28 UTC (rev 167558)
+++ trunk/Source/WebCore/ChangeLog	2014-04-20 01:38:48 UTC (rev 167559)
@@ -1,5 +1,20 @@
 2014-04-19  Chris Fleizach  <[email protected]>
 
+        AX: grid rows are not recognized do to lack of explicit role="row", role="gridcell"
+        https://bugs.webkit.org/show_bug.cgi?id=131819
+
+        Reviewed by Darin Adler.
+
+        Test: accessibility/table-with-missing-aria-role-rows.html
+
+        If a table is using role="grid", and it has <tr> elements that do not have
+        role="row", we should still treat them as row elements.
+
+        * accessibility/AccessibilityARIAGrid.cpp:
+        (WebCore::AccessibilityARIAGrid::addTableCellChild):
+
+2014-04-19  Chris Fleizach  <[email protected]>
+
         AX: Malformed tables exposing incorrect col and colSpans
         https://bugs.webkit.org/show_bug.cgi?id=131796
 

Modified: trunk/Source/WebCore/accessibility/AccessibilityARIAGrid.cpp (167558 => 167559)


--- trunk/Source/WebCore/accessibility/AccessibilityARIAGrid.cpp	2014-04-20 01:25:28 UTC (rev 167558)
+++ trunk/Source/WebCore/accessibility/AccessibilityARIAGrid.cpp	2014-04-20 01:38:48 UTC (rev 167559)
@@ -54,7 +54,7 @@
 
 bool AccessibilityARIAGrid::addTableCellChild(AccessibilityObject* child, HashSet<AccessibilityObject*>& appendedRows, unsigned& columnCount)
 {
-    if (!child || !child->isTableRow() || child->ariaRoleAttribute() != RowRole)
+    if (!child || (!child->isTableRow() && child->ariaRoleAttribute() != RowRole))
         return false;
         
     AccessibilityTableRow* row = toAccessibilityTableRow(child);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to