Diff
Modified: trunk/LayoutTests/ChangeLog (224996 => 224997)
--- trunk/LayoutTests/ChangeLog 2017-11-17 23:36:24 UTC (rev 224996)
+++ trunk/LayoutTests/ChangeLog 2017-11-17 23:44:16 UTC (rev 224997)
@@ -1,3 +1,16 @@
+2017-11-17 Chris Fleizach <[email protected]>
+
+ AX: VoiceOver in Safari does not read table header for first cell in first body row
+ https://bugs.webkit.org/show_bug.cgi?id=179780
+ <rdar://problem/35590551>
+
+ Reviewed by Joanmarie Diggs.
+
+ * accessibility/table-header-calculation-for-header-rows-expected.txt: Added.
+ * accessibility/table-header-calculation-for-header-rows.html: Added.
+ * accessibility/table-attributes-expected.txt: Updated.
+ * platform/gtk/accessibility/table-attributes-expected.txt: Updated.
+
2017-11-17 Nan Wang <[email protected]>
AX: AOM: Implement boolean type properties
Modified: trunk/LayoutTests/accessibility/table-attributes-expected.txt (224996 => 224997)
--- trunk/LayoutTests/accessibility/table-attributes-expected.txt 2017-11-17 23:36:24 UTC (rev 224996)
+++ trunk/LayoutTests/accessibility/table-attributes-expected.txt 2017-11-17 23:44:16 UTC (rev 224997)
@@ -200,83 +200,9 @@
AXRole: AXCell
AXSubrole: (null)
AXRoleDescription: cell
-AXChildren: <array of size 3>
-AXHelp:
-AXParent: <AXCell>
-AXSize: NSSize: {145, 66}
-AXTitle:
-AXDescription:
-AXValue:
-AXFocused: 0
-AXEnabled: 1
-AXWindow: <AXCell>
-AXSelectedTextMarkerRange: (null)
-AXStartTextMarker: <AXCell>
-AXEndTextMarker: <AXCell>
-AXVisited: 0
-AXLinkedUIElements: <array of size 0>
-AXSelected: 0
-AXBlockQuoteLevel: 0
-AXTopLevelUIElement: <AXCell>
-AXLanguage:
-AXDOMIdentifier:
-AXDOMClassList: <array of size 1>
-AXFocusableAncestor: <AXCell>
-AXEditableAncestor: (null)
-AXHighestEditableAncestor: (null)
-AXRowIndexRange: NSRange: {0, 2}
-AXColumnIndexRange: NSRange: {0, 2}
-AXColumnHeaderUIElements: <array of size 0>
-AXRowHeaderUIElements: <array of size 0>
-AXARIAColumnIndex: -1
-AXARIARowIndex: -1
-AXElementBusy: 0
-AXRequired: 0
-
-------------
-AXRole: AXCell
-AXSubrole: (null)
-AXRoleDescription: cell
AXChildren: <array of size 1>
AXHelp:
AXParent: <AXCell>
-AXSize: NSSize: {54, 36}
-AXTitle:
-AXDescription:
-AXValue:
-AXFocused: 0
-AXEnabled: 1
-AXWindow: <AXCell>
-AXSelectedTextMarkerRange: (null)
-AXStartTextMarker: <AXCell>
-AXEndTextMarker: <AXCell>
-AXVisited: 0
-AXLinkedUIElements: <array of size 0>
-AXSelected: 0
-AXBlockQuoteLevel: 0
-AXTopLevelUIElement: <AXCell>
-AXLanguage:
-AXDOMIdentifier:
-AXDOMClassList: <array of size 1>
-AXFocusableAncestor: <AXCell>
-AXEditableAncestor: (null)
-AXHighestEditableAncestor: (null)
-AXRowIndexRange: NSRange: {1, 1}
-AXColumnIndexRange: NSRange: {3, 1}
-AXColumnHeaderUIElements: <array of size 1>
-AXRowHeaderUIElements: <array of size 1>
-AXARIAColumnIndex: -1
-AXARIARowIndex: -1
-AXElementBusy: 0
-AXRequired: 0
-
-------------
-AXRole: AXCell
-AXSubrole: (null)
-AXRoleDescription: cell
-AXChildren: <array of size 1>
-AXHelp:
-AXParent: <AXCell>
AXSize: NSSize: {92, 60}
AXTitle:
AXDescription:
Added: trunk/LayoutTests/accessibility/table-header-calculation-for-header-rows-expected.txt (0 => 224997)
--- trunk/LayoutTests/accessibility/table-header-calculation-for-header-rows-expected.txt (rev 0)
+++ trunk/LayoutTests/accessibility/table-header-calculation-for-header-rows-expected.txt 2017-11-17 23:44:16 UTC (rev 224997)
@@ -0,0 +1,11 @@
+This test makes sure cells are not marked as row headers when they're in a row of headers.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS table1.rowHeaders().length is 0
+PASS table2.rowHeaders().length is 1
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/accessibility/table-header-calculation-for-header-rows.html (0 => 224997)
--- trunk/LayoutTests/accessibility/table-header-calculation-for-header-rows.html (rev 0)
+++ trunk/LayoutTests/accessibility/table-header-calculation-for-header-rows.html 2017-11-17 23:44:16 UTC (rev 224997)
@@ -0,0 +1,42 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+</head>
+<body id="body">
+
+<div id="content">
+<table border=1 id="table1">
+<tr><th>header 1</th><th>header 2</th><th>header 3</th></tr>
+<tr><td>cell 1</th><th>cell 2</th><th>cell 2</th></tr>
+</table>
+
+<table border=1 id="table2">
+<tr><th>header 1</th><td>header 2</th><td>header 3</th></tr>
+<tr><td>cell 1</th><th>cell 2</th><th>cell 2</th></tr>
+</table>
+
+</div>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+ description("This test makes sure cells are not marked as row headers when they're in a row of headers.");
+
+ if (window.accessibilityController) {
+ var table1 = accessibilityController.accessibleElementById("table1");
+ shouldBe("table1.rowHeaders().length", "0");
+
+ var table2 = accessibilityController.accessibleElementById("table2");
+ shouldBe("table2.rowHeaders().length", "1");
+
+ document.getElementById("content").style.visibility = "hidden";
+ }
+
+</script>
+
+<script src=""
+</body>
+</html>
Modified: trunk/LayoutTests/platform/gtk/accessibility/table-attributes-expected.txt (224996 => 224997)
--- trunk/LayoutTests/platform/gtk/accessibility/table-attributes-expected.txt 2017-11-17 23:36:24 UTC (rev 224996)
+++ trunk/LayoutTests/platform/gtk/accessibility/table-attributes-expected.txt 2017-11-17 23:44:16 UTC (rev 224997)
@@ -107,44 +107,6 @@
--------------------------
-AXRole: AXColumnHeader
-AXParent: AXRow
-AXChildren: 0
-AXPosition: { 227.000000, 27.000000 }
-AXSize: { 143.000000, 66.000000 }
-AXTitle:
-AXDescription:
-AXValue: Ruritanian<\n>Population <\n>Survey
-AXFocusable: 0
-AXFocused: 0
-AXSelectable: 0
-AXSelected: 0
-AXMultiSelectable: 0
-AXEnabled: 1
-AXExpanded: 0
-AXRequired: 0
-AXChecked: 0
-AXPlatformAttributes: computed-role:columnheader, tag:th, toolkit:WebKitGtk
-------------
-AXRole: AXColumnHeader
-AXParent: AXRow
-AXChildren: 0
-AXPosition: { 227.000000, 27.000000 }
-AXSize: { 143.000000, 66.000000 }
-AXTitle:
-AXDescription:
-AXValue: Ruritanian<\n>Population <\n>Survey
-AXFocusable: 0
-AXFocused: 0
-AXSelectable: 0
-AXSelected: 0
-AXMultiSelectable: 0
-AXEnabled: 1
-AXExpanded: 0
-AXRequired: 0
-AXChecked: 0
-AXPlatformAttributes: computed-role:columnheader, tag:th, toolkit:WebKitGtk
-------------
AXRole: AXRowHeader
AXParent: AXRow
AXChildren: 0
Modified: trunk/Source/WebCore/ChangeLog (224996 => 224997)
--- trunk/Source/WebCore/ChangeLog 2017-11-17 23:36:24 UTC (rev 224996)
+++ trunk/Source/WebCore/ChangeLog 2017-11-17 23:44:16 UTC (rev 224997)
@@ -1,3 +1,18 @@
+2017-11-17 Chris Fleizach <[email protected]>
+
+ AX: VoiceOver in Safari does not read table header for first cell in first body row
+ https://bugs.webkit.org/show_bug.cgi?id=179780
+ <rdar://problem/35590551>
+
+ Reviewed by Joanmarie Diggs.
+
+ A table cell shouldn't be considered a row header if it's in a row of other headers.
+
+ Test: accessibility/table-header-calculation-for-header-rows.html
+
+ * accessibility/AccessibilityTableRow.cpp:
+ (WebCore::AccessibilityTableRow::headerObject):
+
2017-11-17 Simon Fraser <[email protected]>
Don't invert a matrix for every channel of every pixel of an FETurbulence filter
Modified: trunk/Source/WebCore/accessibility/AccessibilityTableRow.cpp (224996 => 224997)
--- trunk/Source/WebCore/accessibility/AccessibilityTableRow.cpp 2017-11-17 23:36:24 UTC (rev 224996)
+++ trunk/Source/WebCore/accessibility/AccessibilityTableRow.cpp 2017-11-17 23:44:16 UTC (rev 224997)
@@ -132,6 +132,18 @@
if (!cellNode || !cellNode->hasTagName(thTag))
return nullptr;
+ // Verify that the row header is not part of an entire row of headers.
+ // In that case, it is unlikely this is a row header.
+ bool allHeadersInRow = true;
+ for (auto cell : rowChildren) {
+ if (cell->node() && !cell->node()->hasTagName(thTag)) {
+ allHeadersInRow = false;
+ break;
+ }
+ }
+ if (allHeadersInRow)
+ return nullptr;
+
return cell;
}