Title: [186692] trunk
Revision
186692
Author
[email protected]
Date
2015-07-10 15:04:50 -0700 (Fri, 10 Jul 2015)

Log Message

Source/WebCore:
Added ARIA 1.1 "cell" and "table" roles.
https://bugs.webkit.org/show_bug.cgi?id=146011
<rdar://problem/21398946>

Patch by Nan Wang <[email protected]> on 2015-07-10
Reviewed by Chris Fleizach.

Created a new role called GridCellRole to match the gridcell role,
so the previous CellRole and TableRole will match to cell and table role.
Made the changes to make sure that both GridRole and TableRole have same
behavior, as well as the circumstance for GridCellRole and CellRole.

Test: accessibility/roles-table-and-cell.html

* accessibility/AXObjectCache.cpp:
(WebCore::createFromRenderer):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::supportsRequiredAttribute):
(WebCore::AccessibilityNodeObject::canSetSelectedAttribute):
* accessibility/AccessibilityObject.cpp:
(WebCore::initializeRoleMap):
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::setSelectedRows):
(WebCore::AccessibilityRenderObject::inheritsPresentationalRole):
(WebCore::AccessibilityRenderObject::selectedChildren):
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::roleValue):
* accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::determineAccessibilityRole):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper _accessibilityTableAncestor]):
(-[WebAccessibilityObjectWrapper _accessibilityTraitsFromAncestors]):
(-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(createAccessibilityRoleMap):

LayoutTests:
Added tests for new role: table and cell.
https://bugs.webkit.org/show_bug.cgi?id=146011.

Patch by Nan Wang <[email protected]> on 2015-07-10
Reviewed by Chris Fleizach.

Added tests for table and cell role. Also modified other tests to fit the changes.

* accessibility/roles-computedRoleString-expected.txt:
* accessibility/roles-computedRoleString.html:
* accessibilit/roles-table-and-cell-expected.txt: Added.
* accessibility/roles-table-and-cell.html: Added.
* platform/mac/accessibility/aria-table-hierarchy-expected.txt:
* platform/mac/accessibility/aria-tables-expected.txt:
* platform/mac/accessibility/roles-exposed-expected.txt:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (186691 => 186692)


--- trunk/LayoutTests/ChangeLog	2015-07-10 21:19:51 UTC (rev 186691)
+++ trunk/LayoutTests/ChangeLog	2015-07-10 22:04:50 UTC (rev 186692)
@@ -1,3 +1,20 @@
+2015-07-10  Nan Wang  <[email protected]>
+
+        Added tests for new role: table and cell.
+        https://bugs.webkit.org/show_bug.cgi?id=146011.
+
+        Reviewed by Chris Fleizach.
+
+        Added tests for table and cell role. Also modified other tests to fit the changes.
+
+        * accessibility/roles-computedRoleString-expected.txt:
+        * accessibility/roles-computedRoleString.html:
+        * accessibilit/roles-table-and-cell-expected.txt: Added.
+        * accessibility/roles-table-and-cell.html: Added.
+        * platform/mac/accessibility/aria-table-hierarchy-expected.txt:
+        * platform/mac/accessibility/aria-tables-expected.txt:
+        * platform/mac/accessibility/roles-exposed-expected.txt:
+
 2015-07-10  Daniel Bates  <[email protected]>
 
         Serialized declaration for background-size/-webkit-mask-size should preserve identical

Modified: trunk/LayoutTests/accessibility/aria-table-with-presentational-elements-expected.txt (186691 => 186692)


--- trunk/LayoutTests/accessibility/aria-table-with-presentational-elements-expected.txt	2015-07-10 21:19:51 UTC (rev 186691)
+++ trunk/LayoutTests/accessibility/aria-table-with-presentational-elements-expected.txt	2015-07-10 22:04:50 UTC (rev 186692)
@@ -4,7 +4,7 @@
 
 
 PASS row.role is 'AXRole: AXRow'
-PASS row.parentElement().role is 'AXRole: AXTable'
+PASS row.parentElement().role is 'AXRole: AXGrid'
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/accessibility/aria-table-with-presentational-elements.html (186691 => 186692)


--- trunk/LayoutTests/accessibility/aria-table-with-presentational-elements.html	2015-07-10 21:19:51 UTC (rev 186691)
+++ trunk/LayoutTests/accessibility/aria-table-with-presentational-elements.html	2015-07-10 22:04:50 UTC (rev 186692)
@@ -32,7 +32,7 @@
     var table = accessibilityController.accessibleElementById("table");
     var row = table.rowAtIndex(0);
     shouldBe("row.role", "'AXRole: AXRow'");
-    shouldBe("row.parentElement().role", "'AXRole: AXTable'");
+    shouldBe("row.parentElement().role", "'AXRole: AXGrid'");
 
     document.getElementById("content").style.visibility = "hidden";
 }

Modified: trunk/LayoutTests/accessibility/roles-computedRoleString-expected.txt (186691 => 186692)


--- trunk/LayoutTests/accessibility/roles-computedRoleString-expected.txt	2015-07-10 21:19:51 UTC (rev 186691)
+++ trunk/LayoutTests/accessibility/roles-computedRoleString-expected.txt	2015-07-10 22:04:50 UTC (rev 186692)
@@ -57,13 +57,20 @@
 PASS: optgroup -> option. 
 PASS: option -> option. 
 PASS: option -> option. 
-PASS: table -> grid. 
+PASS: table -> table. 
 PASS: tr -> row. 
 PASS: th -> columnheader. 
 PASS: tr -> row. 
-PASS: td -> gridcell. 
+PASS: td -> cell. 
 PASS: tr -> row. 
-PASS: td -> gridcell. 
+PASS: td -> cell. 
+PASS: table[role="grid"] -> grid. 
+PASS: tr -> row. 
+PASS: th -> columnheader. 
+PASS: tr -> row. 
+PASS: td[role="gridcell"] -> gridcell. 
+PASS: tr -> row. 
+PASS: td[role="gridcell"] -> gridcell. 
 PASS: textarea -> textbox. 
 PASS: ul -> list. 
 PASS: li -> listitem. 

Modified: trunk/LayoutTests/accessibility/roles-computedRoleString.html (186691 => 186692)


--- trunk/LayoutTests/accessibility/roles-computedRoleString.html	2015-07-10 21:19:51 UTC (rev 186691)
+++ trunk/LayoutTests/accessibility/roles-computedRoleString.html	2015-07-10 22:04:50 UTC (rev 186692)
@@ -97,7 +97,7 @@
 <sup data-role="" class="ex">X</sup>
 <svg data-role="" class="ex">X</svg>
 
-<table data-role="grid" class="ex">
+<table data-role="table" class="ex">
     <caption data-role="" class="ex">X</caption>
     <thead data-role="rowgroup" class="ex">
         <tr data-role="row" class="ex">
@@ -106,15 +106,35 @@
     </thead>
     <tbody data-role="rowgroup" class="ex">
         <tr data-role="row" class="ex">
-            <td data-role="gridcell" class="ex">X</td>
+            <td data-role="cell" class="ex">X</td>
         </tr>
     </tbody>
     <tfoot data-role="rowgroup" class="ex">
         <tr data-role="row" class="ex">
-            <td data-role="gridcell" class="ex">X</td>
+            <td data-role="cell" class="ex">X</td>
         </tr>
     </tfoot>
 </table>
+
+<table role="grid" data-role="grid" class="ex">
+    <caption data-role="" class="ex">X</caption>
+    <thead data-role="rowgroup" class="ex">
+        <tr data-role="row" class="ex">
+            <th data-role="columnheader" class="ex">X</th>
+        </tr>
+    </thead>
+    <tbody data-role="rowgroup" class="ex">
+        <tr data-role="row" class="ex">
+            <td role="gridcell" data-role="gridcell" class="ex">X</td>
+        </tr>
+    </tbody>
+    <tfoot data-role="rowgroup" class="ex">
+        <tr data-role="row" class="ex">
+            <td role="gridcell" data-role="gridcell" class="ex">X</td>
+        </tr>
+    </tfoot>
+</table>
+
 <textarea data-role="textbox" class="ex">X</textarea>
 <time data-role="" class="ex">X</time>
 <ul data-role="list" class="ex">

Added: trunk/LayoutTests/accessibility/roles-table-and-cell-expected.txt (0 => 186692)


--- trunk/LayoutTests/accessibility/roles-table-and-cell-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/accessibility/roles-table-and-cell-expected.txt	2015-07-10 22:04:50 UTC (rev 186692)
@@ -0,0 +1,14 @@
+This tests that table and cell have the correct ARIA roles
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS: div[role="grid"] -> grid. 
+PASS: table[role="table"] -> table. 
+PASS: td[role="gridcell"] -> gridcell. 
+PASS: td -> cell. 
+PASS: td[role="cell"] -> cell. 
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/accessibility/roles-table-and-cell.html (0 => 186692)


--- trunk/LayoutTests/accessibility/roles-table-and-cell.html	                        (rev 0)
+++ trunk/LayoutTests/accessibility/roles-table-and-cell.html	2015-07-10 22:04:50 UTC (rev 186692)
@@ -0,0 +1,71 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<script src=""
+
+<!-- ==================================================================================================== -->
+<!-- This tests ARIA table role and cell role work as intended                                            -->
+<!-- ==================================================================================================== -->
+
+<div role="grid" data-role="grid" class="ex">
+	<div role="gridcell" data-role="gridcell" class="ex">data</div>
+  	<div role="cell" data-role="cell" class="ex">data2</div>
+  	<div role="cell" data-role="cell" class="ex">data3</div>
+</div>
+
+<table role="table" data-role="table" class="ex">
+	<td role="gridcell" data-role="gridcell" class="ex">data</td>
+  	<td data-role="cell" class="ex">data2</td>
+  	<td role="cell" data-role="cell" class="ex">data3</td>
+</table>
+
+<div id="console"></div>
+<script>
+if (window.testRunner && window.accessibilityController) {
+    description("This tests that table and cell have the correct ARIA roles")
+    var examples = document.querySelectorAll(".ex");
+    var el, contentAttrRoleString, axElement, computedAriaRole, output, expectedRole, expectation, result, note;
+    for (var i = 0, c = examples.length; i < c; i++) {
+        el = examples[i];
+		el.id = "ex" + i
+
+        axElement = accessibilityController.accessibleElementById(el.id);
+        if (!axElement)
+        	continue;
+
+        computedAriaRole = axElement.computedRoleString;
+
+        contentAttrRoleString = el.getAttribute("role");
+        note = el.getAttribute("data-note")
+        output = el.tagName.toLowerCase() + (contentAttrRoleString ? ("[role=\""+contentAttrRoleString+"\"]") : "") + (note ? note : "");
+        output += " -> ";
+        output += computedAriaRole;
+        output += ". ";
+
+        expectedRole = "";
+        if (el.hasAttribute("data-role")) {
+            expectedRole = el.getAttribute("data-role");
+        }
+
+        expectation = expectedRole;
+        matchedResults = (computedAriaRole == expectedRole)
+
+        result = document.getElementById('console');
+        if (matchedResults) {
+            result.innerText += "PASS: " + output + "\n";
+        } else {
+            result.innerText += "FAIL: " + output + "Expected: " + expectation + ".\n";
+        }
+    }
+
+    // Once tests are complete, hide all the example markup.
+    examples = document.querySelectorAll(".ex");
+    for (var i = 0, c = examples.length; i < c; i++) {
+        el = examples[i];
+        el.style.display = "none";
+    }
+}
+</script>
+<script src=""
+</body>
+</html>

Modified: trunk/LayoutTests/platform/mac/accessibility/aria-table-hierarchy-expected.txt (186691 => 186692)


--- trunk/LayoutTests/platform/mac/accessibility/aria-table-hierarchy-expected.txt	2015-07-10 21:19:51 UTC (rev 186691)
+++ trunk/LayoutTests/platform/mac/accessibility/aria-table-hierarchy-expected.txt	2015-07-10 22:04:50 UTC (rev 186692)
@@ -25,7 +25,7 @@
 
 
 AXRole: AXWebArea AXValue: 
-  AXRole: AXTable AXValue: 
+  AXRole: AXGrid AXValue: 
     AXRole: AXRow AXValue: 
       AXRole: AXCell AXValue: 
         AXRole: AXStaticText AXValue: foo
@@ -38,7 +38,7 @@
       AXRole: AXCell AXValue: 
         AXRole: AXStaticText AXValue: bar
     AXRole: AXGroup AXValue: 
-  AXRole: AXTable AXValue: 
+  AXRole: AXGrid AXValue: 
     AXRole: AXRow AXValue: 
       AXRole: AXCell AXValue: 
         AXRole: AXStaticText AXValue: Odd
@@ -73,7 +73,7 @@
         AXRole: AXStaticText AXValue: Odd
       AXRole: AXCell AXValue: 
         AXRole: AXStaticText AXValue: Even
-  AXRole: AXTable AXValue: 
+  AXRole: AXGrid AXValue: 
     AXRole: AXRow AXValue: 
       AXRole: AXCell AXValue: 
         AXRole: AXStaticText AXValue: hello
@@ -86,7 +86,7 @@
       AXRole: AXCell AXValue: 
         AXRole: AXStaticText AXValue: world
     AXRole: AXGroup AXValue: 
-  AXRole: AXTable AXValue: 
+  AXRole: AXGrid AXValue: 
     AXRole: AXRow AXValue: 
       AXRole: AXCell AXValue: 
         AXRole: AXStaticText AXValue: Odd

Modified: trunk/LayoutTests/platform/mac/accessibility/aria-tables-expected.txt (186691 => 186692)


--- trunk/LayoutTests/platform/mac/accessibility/aria-tables-expected.txt	2015-07-10 21:19:51 UTC (rev 186691)
+++ trunk/LayoutTests/platform/mac/accessibility/aria-tables-expected.txt	2015-07-10 22:04:50 UTC (rev 186692)
@@ -10,8 +10,8 @@
 header 1	header 2	header 2
 cell	cell	cell
 cell
-AXRole: AXTable
-AXRole: AXTable
+AXRole: AXGrid
+AXRole: AXGrid
 AXRole: AXCell
 AXRole: AXCell
 AXRole: AXCell

Modified: trunk/LayoutTests/platform/mac/accessibility/roles-exposed-expected.txt (186691 => 186692)


--- trunk/LayoutTests/platform/mac/accessibility/roles-exposed-expected.txt	2015-07-10 21:19:51 UTC (rev 186691)
+++ trunk/LayoutTests/platform/mac/accessibility/roles-exposed-expected.txt	2015-07-10 22:04:50 UTC (rev 186692)
@@ -875,9 +875,9 @@
       AXRoleDescription: group
       
 div[role=grid]
-      AXRole: AXTable
+      AXRole: AXGrid
       AXSubrole: 
-      AXRoleDescription: table
+      AXRoleDescription: grid
       
 div[role=rowgroup]
       AXRole: 
@@ -1135,9 +1135,9 @@
       AXRoleDescription: outline row
       
 div[role=treegrid]
-      AXRole: AXTable
+      AXRole: AXGrid
       AXSubrole: 
-      AXRoleDescription: table
+      AXRoleDescription: grid
       
 div[role=rowgroup]
       AXRole: 

Modified: trunk/LayoutTests/platform/mac-mavericks/accessibility/roles-exposed-expected.txt (186691 => 186692)


--- trunk/LayoutTests/platform/mac-mavericks/accessibility/roles-exposed-expected.txt	2015-07-10 21:19:51 UTC (rev 186691)
+++ trunk/LayoutTests/platform/mac-mavericks/accessibility/roles-exposed-expected.txt	2015-07-10 22:04:50 UTC (rev 186692)
@@ -875,9 +875,9 @@
       AXRoleDescription: group
       
 div[role=grid]
-      AXRole: AXTable
+      AXRole: AXGrid
       AXSubrole: 
-      AXRoleDescription: table
+      AXRoleDescription: grid
       
 div[role=rowgroup]
       AXRole: 
@@ -1135,9 +1135,9 @@
       AXRoleDescription: outline row
       
 div[role=treegrid]
-      AXRole: AXTable
+      AXRole: AXGrid
       AXSubrole: 
-      AXRoleDescription: table
+      AXRoleDescription: grid
       
 div[role=rowgroup]
       AXRole: 

Modified: trunk/Source/WebCore/ChangeLog (186691 => 186692)


--- trunk/Source/WebCore/ChangeLog	2015-07-10 21:19:51 UTC (rev 186691)
+++ trunk/Source/WebCore/ChangeLog	2015-07-10 22:04:50 UTC (rev 186692)
@@ -1,3 +1,41 @@
+2015-07-10  Nan Wang  <[email protected]>
+
+        Added ARIA 1.1 "cell" and "table" roles.
+        https://bugs.webkit.org/show_bug.cgi?id=146011
+        <rdar://problem/21398946>
+
+        Reviewed by Chris Fleizach.
+
+        Created a new role called GridCellRole to match the gridcell role, 
+        so the previous CellRole and TableRole will match to cell and table role.
+        Made the changes to make sure that both GridRole and TableRole have same
+        behavior, as well as the circumstance for GridCellRole and CellRole.
+
+        Test: accessibility/roles-table-and-cell.html
+
+        * accessibility/AXObjectCache.cpp:
+        (WebCore::createFromRenderer):
+        * accessibility/AccessibilityNodeObject.cpp:
+        (WebCore::AccessibilityNodeObject::supportsRequiredAttribute):
+        (WebCore::AccessibilityNodeObject::canSetSelectedAttribute):
+        * accessibility/AccessibilityObject.cpp:
+        (WebCore::initializeRoleMap):
+        * accessibility/AccessibilityObject.h:
+        * accessibility/AccessibilityRenderObject.cpp:
+        (WebCore::AccessibilityRenderObject::setSelectedRows):
+        (WebCore::AccessibilityRenderObject::inheritsPresentationalRole):
+        (WebCore::AccessibilityRenderObject::selectedChildren):
+        * accessibility/AccessibilityTable.cpp:
+        (WebCore::AccessibilityTable::roleValue):
+        * accessibility/AccessibilityTableCell.cpp:
+        (WebCore::AccessibilityTableCell::determineAccessibilityRole):
+        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
+        (-[WebAccessibilityObjectWrapper _accessibilityTableAncestor]):
+        (-[WebAccessibilityObjectWrapper _accessibilityTraitsFromAncestors]):
+        (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
+        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+        (createAccessibilityRoleMap):
+
 2015-07-10  Daniel Bates  <[email protected]>
 
         Serialized declaration for background-size/-webkit-mask-size should preserve identical

Modified: trunk/Source/WebCore/accessibility/AXObjectCache.cpp (186691 => 186692)


--- trunk/Source/WebCore/accessibility/AXObjectCache.cpp	2015-07-10 21:19:51 UTC (rev 186691)
+++ trunk/Source/WebCore/accessibility/AXObjectCache.cpp	2015-07-10 22:04:50 UTC (rev 186692)
@@ -281,11 +281,11 @@
         return AccessibilityList::create(renderer);
 
     // aria tables
-    if (nodeHasRole(node, "grid") || nodeHasRole(node, "treegrid"))
+    if (nodeHasRole(node, "grid") || nodeHasRole(node, "treegrid") || nodeHasRole(node, "table"))
         return AccessibilityARIAGrid::create(renderer);
     if (nodeHasRole(node, "row"))
         return AccessibilityARIAGridRow::create(renderer);
-    if (nodeHasRole(node, "gridcell") || nodeHasRole(node, "columnheader") || nodeHasRole(node, "rowheader"))
+    if (nodeHasRole(node, "gridcell") || nodeHasRole(node, "cell") || nodeHasRole(node, "columnheader") || nodeHasRole(node, "rowheader"))
         return AccessibilityARIAGridCell::create(renderer);
 
 #if ENABLE(VIDEO)

Modified: trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp (186691 => 186692)


--- trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp	2015-07-10 21:19:51 UTC (rev 186691)
+++ trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp	2015-07-10 22:04:50 UTC (rev 186692)
@@ -799,6 +799,7 @@
     case CheckBoxRole:
     case ComboBoxRole:
     case GridRole:
+    case GridCellRole:
     case IncrementorRole:
     case ListBoxRole:
     case PopUpButtonRole:
@@ -2061,6 +2062,7 @@
     // Elements that can be selected
     switch (roleValue()) {
     case CellRole:
+    case GridCellRole:
     case RadioButtonRole:
     case RowHeaderRole:
     case RowRole:

Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.cpp (186691 => 186692)


--- trunk/Source/WebCore/accessibility/AccessibilityObject.cpp	2015-07-10 21:19:51 UTC (rev 186691)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.cpp	2015-07-10 22:04:50 UTC (rev 186692)
@@ -1914,8 +1914,10 @@
         { "contentinfo", LandmarkContentInfoRole },
         { "dialog", ApplicationDialogRole },
         { "directory", DirectoryRole },
-        { "grid", TableRole },
-        { "gridcell", CellRole },
+        { "grid", GridRole },
+        { "gridcell", GridCellRole },
+        { "table", TableRole },
+        { "cell", CellRole },
         { "columnheader", ColumnHeaderRole },
         { "combobox", ComboBoxRole },
         { "definition", DefinitionRole },

Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.h (186691 => 186692)


--- trunk/Source/WebCore/accessibility/AccessibilityObject.h	2015-07-10 21:19:51 UTC (rev 186691)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.h	2015-07-10 22:04:50 UTC (rev 186692)
@@ -132,6 +132,7 @@
     FooterRole,
     FormRole,
     GridRole,
+    GridCellRole,
     GroupRole,
     GrowAreaRole,
     HeadingRole,

Modified: trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp (186691 => 186692)


--- trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp	2015-07-10 21:19:51 UTC (rev 186691)
+++ trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp	2015-07-10 22:04:50 UTC (rev 186692)
@@ -1692,7 +1692,7 @@
 {
     // Setting selected only makes sense in trees and tables (and tree-tables).
     AccessibilityRole role = roleValue();
-    if (role != TreeRole && role != TreeGridRole && role != TableRole)
+    if (role != TreeRole && role != TreeGridRole && role != TableRole && role != GridRole)
         return;
     
     bool isMulti = isMultiSelectable();
@@ -2743,6 +2743,7 @@
         }
         possibleParentTagNames = &listItemParents.get();
         break;
+    case GridCellRole:
     case CellRole:
         if (tableCellParents.get().isEmpty())
             tableCellParents.get().add(tableTag);
@@ -3238,7 +3239,7 @@
     AccessibilityRole role = roleValue();
     if (role == ListBoxRole) // native list boxes would be AccessibilityListBoxes, so only check for aria list boxes
         ariaListboxSelectedChildren(result);
-    else if (role == TreeRole || role == TreeGridRole || role == TableRole)
+    else if (role == TreeRole || role == TreeGridRole || role == TableRole || role == GridRole)
         ariaSelectedRows(result);
 }
 

Modified: trunk/Source/WebCore/accessibility/AccessibilityTable.cpp (186691 => 186692)


--- trunk/Source/WebCore/accessibility/AccessibilityTable.cpp	2015-07-10 21:19:51 UTC (rev 186691)
+++ trunk/Source/WebCore/accessibility/AccessibilityTable.cpp	2015-07-10 22:04:50 UTC (rev 186692)
@@ -585,6 +585,10 @@
 {
     if (!isExposableThroughAccessibility())
         return AccessibilityRenderObject::roleValue();
+    
+    AccessibilityRole ariaRole = ariaRoleAttribute();
+    if (ariaRole == GridRole || ariaRole == TreeGridRole)
+        return GridRole;
 
     return TableRole;
 }

Modified: trunk/Source/WebCore/accessibility/AccessibilityTableCell.cpp (186691 => 186692)


--- trunk/Source/WebCore/accessibility/AccessibilityTableCell.cpp	2015-07-10 21:19:51 UTC (rev 186691)
+++ trunk/Source/WebCore/accessibility/AccessibilityTableCell.cpp	2015-07-10 22:04:50 UTC (rev 186692)
@@ -111,7 +111,7 @@
     // role, falling back on the role to be used if we determine here that the element
     // should not be exposed as a cell. Thus if we already know it's a cell, return that.
     AccessibilityRole defaultRole = AccessibilityRenderObject::determineAccessibilityRole();
-    if (defaultRole == ColumnHeaderRole || defaultRole == RowHeaderRole || defaultRole == CellRole)
+    if (defaultRole == ColumnHeaderRole || defaultRole == RowHeaderRole || defaultRole == CellRole || defaultRole == GridCellRole)
         return defaultRole;
 
     if (!isTableCell())

Modified: trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm (186691 => 186692)


--- trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm	2015-07-10 21:19:51 UTC (rev 186691)
+++ trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm	2015-07-10 22:04:50 UTC (rev 186692)
@@ -479,7 +479,7 @@
 - (AccessibilityObjectWrapper*)_accessibilityTableAncestor
 {
     for (AccessibilityObject* parent = m_object->parentObject(); parent != nil; parent = parent->parentObject()) {
-        if (parent->roleValue() == TableRole)
+        if (parent->roleValue() == TableRole || parent->roleValue() == GridRole)
             return parent->wrapper();   
     }
     
@@ -521,6 +521,7 @@
             case ListRole:
                 traits |= [self _axContainedByListTrait];
                 break;
+            case GridRole:
             case TableRole:
                 traits |= [self _axContainedByTableTrait];
                 break;
@@ -731,6 +732,7 @@
         case FooterRole:
         case FormRole:
         case GridRole:
+        case GridCellRole:
         case GrowAreaRole:
         case HelpTagRole:
         case IgnoredRole:

Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (186691 => 186692)


--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm	2015-07-10 21:19:51 UTC (rev 186691)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm	2015-07-10 22:04:50 UTC (rev 186692)
@@ -1928,6 +1928,7 @@
         { ListBoxRole, NSAccessibilityListRole },
         { ListBoxOptionRole, NSAccessibilityStaticTextRole },
         { CellRole, NSAccessibilityCellRole },
+        { GridCellRole, NSAccessibilityCellRole },
         { TableHeaderContainerRole, NSAccessibilityGroupRole },
         { ColumnHeaderRole, NSAccessibilityCellRole },
         { RowHeaderRole, NSAccessibilityCellRole },
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to