Changeset 186692 in webkit
- Timestamp:
- Jul 10, 2015, 3:04:50 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/LayoutTests/ChangeLog ¶
r186687 r186692 1 2015-07-10 Nan Wang <n_wang@apple.com> 2 3 Added tests for new role: table and cell. 4 https://bugs.webkit.org/show_bug.cgi?id=146011. 5 6 Reviewed by Chris Fleizach. 7 8 Added tests for table and cell role. Also modified other tests to fit the changes. 9 10 * accessibility/roles-computedRoleString-expected.txt: 11 * accessibility/roles-computedRoleString.html: 12 * accessibilit/roles-table-and-cell-expected.txt: Added. 13 * accessibility/roles-table-and-cell.html: Added. 14 * platform/mac/accessibility/aria-table-hierarchy-expected.txt: 15 * platform/mac/accessibility/aria-tables-expected.txt: 16 * platform/mac/accessibility/roles-exposed-expected.txt: 17 1 18 2015-07-10 Daniel Bates <dabates@apple.com> 2 19 -
TabularUnified trunk/LayoutTests/accessibility/aria-table-with-presentational-elements-expected.txt ¶
r186587 r186692 5 5 6 6 PASS row.role is 'AXRole: AXRow' 7 PASS row.parentElement().role is 'AXRole: AX Table'7 PASS row.parentElement().role is 'AXRole: AXGrid' 8 8 PASS successfullyParsed is true 9 9 -
TabularUnified trunk/LayoutTests/accessibility/aria-table-with-presentational-elements.html ¶
r186587 r186692 33 33 var row = table.rowAtIndex(0); 34 34 shouldBe("row.role", "'AXRole: AXRow'"); 35 shouldBe("row.parentElement().role", "'AXRole: AX Table'");35 shouldBe("row.parentElement().role", "'AXRole: AXGrid'"); 36 36 37 37 document.getElementById("content").style.visibility = "hidden"; -
TabularUnified trunk/LayoutTests/accessibility/roles-computedRoleString-expected.txt ¶
r183932 r186692 58 58 PASS: option -> option. 59 59 PASS: option -> option. 60 PASS: table -> grid.60 PASS: table -> table. 61 61 PASS: tr -> row. 62 62 PASS: th -> columnheader. 63 63 PASS: tr -> row. 64 PASS: td -> gridcell.64 PASS: td -> cell. 65 65 PASS: tr -> row. 66 PASS: td -> gridcell. 66 PASS: td -> cell. 67 PASS: table[role="grid"] -> grid. 68 PASS: tr -> row. 69 PASS: th -> columnheader. 70 PASS: tr -> row. 71 PASS: td[role="gridcell"] -> gridcell. 72 PASS: tr -> row. 73 PASS: td[role="gridcell"] -> gridcell. 67 74 PASS: textarea -> textbox. 68 75 PASS: ul -> list. -
TabularUnified trunk/LayoutTests/accessibility/roles-computedRoleString.html ¶
r183932 r186692 98 98 <svg data-role="" class="ex">X</svg> 99 99 100 <table data-role=" grid" class="ex">100 <table data-role="table" class="ex"> 101 101 <caption data-role="" class="ex">X</caption> 102 102 <thead data-role="rowgroup" class="ex"> … … 107 107 <tbody data-role="rowgroup" class="ex"> 108 108 <tr data-role="row" class="ex"> 109 <td data-role=" gridcell" class="ex">X</td>109 <td data-role="cell" class="ex">X</td> 110 110 </tr> 111 111 </tbody> 112 112 <tfoot data-role="rowgroup" class="ex"> 113 113 <tr data-role="row" class="ex"> 114 <td data-role=" gridcell" class="ex">X</td>114 <td data-role="cell" class="ex">X</td> 115 115 </tr> 116 116 </tfoot> 117 117 </table> 118 119 <table role="grid" data-role="grid" class="ex"> 120 <caption data-role="" class="ex">X</caption> 121 <thead data-role="rowgroup" class="ex"> 122 <tr data-role="row" class="ex"> 123 <th data-role="columnheader" class="ex">X</th> 124 </tr> 125 </thead> 126 <tbody data-role="rowgroup" class="ex"> 127 <tr data-role="row" class="ex"> 128 <td role="gridcell" data-role="gridcell" class="ex">X</td> 129 </tr> 130 </tbody> 131 <tfoot data-role="rowgroup" class="ex"> 132 <tr data-role="row" class="ex"> 133 <td role="gridcell" data-role="gridcell" class="ex">X</td> 134 </tr> 135 </tfoot> 136 </table> 137 118 138 <textarea data-role="textbox" class="ex">X</textarea> 119 139 <time data-role="" class="ex">X</time> -
TabularUnified trunk/LayoutTests/platform/mac-mavericks/accessibility/roles-exposed-expected.txt ¶
r185185 r186692 876 876 877 877 div[role=grid] 878 AXRole: AX Table879 AXSubrole: 880 AXRoleDescription: table878 AXRole: AXGrid 879 AXSubrole: 880 AXRoleDescription: grid 881 881 882 882 div[role=rowgroup] … … 1136 1136 1137 1137 div[role=treegrid] 1138 AXRole: AX Table1139 AXSubrole: 1140 AXRoleDescription: table1138 AXRole: AXGrid 1139 AXSubrole: 1140 AXRoleDescription: grid 1141 1141 1142 1142 div[role=rowgroup] -
TabularUnified trunk/LayoutTests/platform/mac/accessibility/aria-table-hierarchy-expected.txt ¶
r176706 r186692 26 26 27 27 AXRole: AXWebArea AXValue: 28 AXRole: AX TableAXValue:28 AXRole: AXGrid AXValue: 29 29 AXRole: AXRow AXValue: 30 30 AXRole: AXCell AXValue: … … 39 39 AXRole: AXStaticText AXValue: bar 40 40 AXRole: AXGroup AXValue: 41 AXRole: AX TableAXValue:41 AXRole: AXGrid AXValue: 42 42 AXRole: AXRow AXValue: 43 43 AXRole: AXCell AXValue: … … 74 74 AXRole: AXCell AXValue: 75 75 AXRole: AXStaticText AXValue: Even 76 AXRole: AX TableAXValue:76 AXRole: AXGrid AXValue: 77 77 AXRole: AXRow AXValue: 78 78 AXRole: AXCell AXValue: … … 87 87 AXRole: AXStaticText AXValue: world 88 88 AXRole: AXGroup AXValue: 89 AXRole: AX TableAXValue:89 AXRole: AXGrid AXValue: 90 90 AXRole: AXRow AXValue: 91 91 AXRole: AXCell AXValue: -
TabularUnified trunk/LayoutTests/platform/mac/accessibility/aria-tables-expected.txt ¶
r174567 r186692 11 11 cell cell cell 12 12 cell 13 AXRole: AX Table14 AXRole: AX Table13 AXRole: AXGrid 14 AXRole: AXGrid 15 15 AXRole: AXCell 16 16 AXRole: AXCell -
TabularUnified trunk/LayoutTests/platform/mac/accessibility/roles-exposed-expected.txt ¶
r185185 r186692 876 876 877 877 div[role=grid] 878 AXRole: AX Table879 AXSubrole: 880 AXRoleDescription: table878 AXRole: AXGrid 879 AXSubrole: 880 AXRoleDescription: grid 881 881 882 882 div[role=rowgroup] … … 1136 1136 1137 1137 div[role=treegrid] 1138 AXRole: AX Table1139 AXSubrole: 1140 AXRoleDescription: table1138 AXRole: AXGrid 1139 AXSubrole: 1140 AXRoleDescription: grid 1141 1141 1142 1142 div[role=rowgroup] -
TabularUnified trunk/Source/WebCore/ChangeLog ¶
r186687 r186692 1 2015-07-10 Nan Wang <n_wang@apple.com> 2 3 Added ARIA 1.1 "cell" and "table" roles. 4 https://bugs.webkit.org/show_bug.cgi?id=146011 5 <rdar://problem/21398946> 6 7 Reviewed by Chris Fleizach. 8 9 Created a new role called GridCellRole to match the gridcell role, 10 so the previous CellRole and TableRole will match to cell and table role. 11 Made the changes to make sure that both GridRole and TableRole have same 12 behavior, as well as the circumstance for GridCellRole and CellRole. 13 14 Test: accessibility/roles-table-and-cell.html 15 16 * accessibility/AXObjectCache.cpp: 17 (WebCore::createFromRenderer): 18 * accessibility/AccessibilityNodeObject.cpp: 19 (WebCore::AccessibilityNodeObject::supportsRequiredAttribute): 20 (WebCore::AccessibilityNodeObject::canSetSelectedAttribute): 21 * accessibility/AccessibilityObject.cpp: 22 (WebCore::initializeRoleMap): 23 * accessibility/AccessibilityObject.h: 24 * accessibility/AccessibilityRenderObject.cpp: 25 (WebCore::AccessibilityRenderObject::setSelectedRows): 26 (WebCore::AccessibilityRenderObject::inheritsPresentationalRole): 27 (WebCore::AccessibilityRenderObject::selectedChildren): 28 * accessibility/AccessibilityTable.cpp: 29 (WebCore::AccessibilityTable::roleValue): 30 * accessibility/AccessibilityTableCell.cpp: 31 (WebCore::AccessibilityTableCell::determineAccessibilityRole): 32 * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: 33 (-[WebAccessibilityObjectWrapper _accessibilityTableAncestor]): 34 (-[WebAccessibilityObjectWrapper _accessibilityTraitsFromAncestors]): 35 (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]): 36 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: 37 (createAccessibilityRoleMap): 38 1 39 2015-07-10 Daniel Bates <dabates@apple.com> 2 40 -
TabularUnified trunk/Source/WebCore/accessibility/AXObjectCache.cpp ¶
r186256 r186692 282 282 283 283 // aria tables 284 if (nodeHasRole(node, "grid") || nodeHasRole(node, "treegrid") )284 if (nodeHasRole(node, "grid") || nodeHasRole(node, "treegrid") || nodeHasRole(node, "table")) 285 285 return AccessibilityARIAGrid::create(renderer); 286 286 if (nodeHasRole(node, "row")) 287 287 return AccessibilityARIAGridRow::create(renderer); 288 if (nodeHasRole(node, "gridcell") || nodeHasRole(node, "c olumnheader") || nodeHasRole(node, "rowheader"))288 if (nodeHasRole(node, "gridcell") || nodeHasRole(node, "cell") || nodeHasRole(node, "columnheader") || nodeHasRole(node, "rowheader")) 289 289 return AccessibilityARIAGridCell::create(renderer); 290 290 -
TabularUnified trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp ¶
r186679 r186692 800 800 case ComboBoxRole: 801 801 case GridRole: 802 case GridCellRole: 802 803 case IncrementorRole: 803 804 case ListBoxRole: … … 2062 2063 switch (roleValue()) { 2063 2064 case CellRole: 2065 case GridCellRole: 2064 2066 case RadioButtonRole: 2065 2067 case RowHeaderRole: -
TabularUnified trunk/Source/WebCore/accessibility/AccessibilityObject.cpp ¶
r186598 r186692 1915 1915 { "dialog", ApplicationDialogRole }, 1916 1916 { "directory", DirectoryRole }, 1917 { "grid", TableRole }, 1918 { "gridcell", CellRole }, 1917 { "grid", GridRole }, 1918 { "gridcell", GridCellRole }, 1919 { "table", TableRole }, 1920 { "cell", CellRole }, 1919 1921 { "columnheader", ColumnHeaderRole }, 1920 1922 { "combobox", ComboBoxRole }, -
TabularUnified trunk/Source/WebCore/accessibility/AccessibilityObject.h ¶
r186038 r186692 133 133 FormRole, 134 134 GridRole, 135 GridCellRole, 135 136 GroupRole, 136 137 GrowAreaRole, -
TabularUnified trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp ¶
r186598 r186692 1693 1693 // Setting selected only makes sense in trees and tables (and tree-tables). 1694 1694 AccessibilityRole role = roleValue(); 1695 if (role != TreeRole && role != TreeGridRole && role != TableRole )1695 if (role != TreeRole && role != TreeGridRole && role != TableRole && role != GridRole) 1696 1696 return; 1697 1697 … … 2744 2744 possibleParentTagNames = &listItemParents.get(); 2745 2745 break; 2746 case GridCellRole: 2746 2747 case CellRole: 2747 2748 if (tableCellParents.get().isEmpty()) … … 3239 3240 if (role == ListBoxRole) // native list boxes would be AccessibilityListBoxes, so only check for aria list boxes 3240 3241 ariaListboxSelectedChildren(result); 3241 else if (role == TreeRole || role == TreeGridRole || role == TableRole )3242 else if (role == TreeRole || role == TreeGridRole || role == TableRole || role == GridRole) 3242 3243 ariaSelectedRows(result); 3243 3244 } -
TabularUnified trunk/Source/WebCore/accessibility/AccessibilityTable.cpp ¶
r184199 r186692 586 586 if (!isExposableThroughAccessibility()) 587 587 return AccessibilityRenderObject::roleValue(); 588 589 AccessibilityRole ariaRole = ariaRoleAttribute(); 590 if (ariaRole == GridRole || ariaRole == TreeGridRole) 591 return GridRole; 588 592 589 593 return TableRole; -
TabularUnified trunk/Source/WebCore/accessibility/AccessibilityTableCell.cpp ¶
r183798 r186692 112 112 // should not be exposed as a cell. Thus if we already know it's a cell, return that. 113 113 AccessibilityRole defaultRole = AccessibilityRenderObject::determineAccessibilityRole(); 114 if (defaultRole == ColumnHeaderRole || defaultRole == RowHeaderRole || defaultRole == CellRole )114 if (defaultRole == ColumnHeaderRole || defaultRole == RowHeaderRole || defaultRole == CellRole || defaultRole == GridCellRole) 115 115 return defaultRole; 116 116 -
TabularUnified trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm ¶
r186038 r186692 480 480 { 481 481 for (AccessibilityObject* parent = m_object->parentObject(); parent != nil; parent = parent->parentObject()) { 482 if (parent->roleValue() == TableRole )482 if (parent->roleValue() == TableRole || parent->roleValue() == GridRole) 483 483 return parent->wrapper(); 484 484 } … … 522 522 traits |= [self _axContainedByListTrait]; 523 523 break; 524 case GridRole: 524 525 case TableRole: 525 526 traits |= [self _axContainedByTableTrait]; … … 732 733 case FormRole: 733 734 case GridRole: 735 case GridCellRole: 734 736 case GrowAreaRole: 735 737 case HelpTagRole: -
TabularUnified trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm ¶
r186598 r186692 1929 1929 { ListBoxOptionRole, NSAccessibilityStaticTextRole }, 1930 1930 { CellRole, NSAccessibilityCellRole }, 1931 { GridCellRole, NSAccessibilityCellRole }, 1931 1932 { TableHeaderContainerRole, NSAccessibilityGroupRole }, 1932 1933 { ColumnHeaderRole, NSAccessibilityCellRole },
Note:
See TracChangeset
for help on using the changeset viewer.