haikuwebkit/LayoutTests/accessibility/table-cell-display-block.html

52 lines
1.6 KiB
HTML
Raw Permalink Normal View History

<!DOCTYPE html>
<html>
<head>
<script src="../resources/js-test-pre.js"></script>
</head>
<body id="body">
<div id="content">
<table border=1 id="table1">
<tr><td id="cell1" style="display:block;">a1</td><td>b1</td><td>c1</td></tr>
<tr><td style="display:block;">a2</td><td>b2</td><td>c2</td></tr>
</table>
<table border=1 id="table2" role="group">
<tr><td id="cell2" style="display:block;">a1</td><td>b1</td><td>c1</td></tr>
<tr><td style="display:block;">a2</td><td>b2</td><td>c2</td></tr>
</table>
</div>
<p id="description"></p>
<div id="console"></div>
<script>
description("This tests that if a table cell uses display:block, the table cell will still be accessible");
if (window.accessibilityController) {
var table = accessibilityController.accessibleElementById("table1");
var cell1a = table.cellForColumnAndRow(0, 0);
var cell1b = table.childAtIndex(0).childAtIndex(0);
shouldBeTrue("cell1a.isEqual(cell1b)");
shouldBe("cell1a.role", "'AXRole: AXCell'");
var domCell1 = document.getElementById("cell1");
shouldBe("domCell1.style.display", "'block'");
// Now check a table that uses a different role to make sure we don't have any cell roles.
var table2 = accessibilityController.accessibleElementById("table2");
shouldBe("table2.role", "'AXRole: AXGroup'");
var cell2 = table2.childAtIndex(0).childAtIndex(0);
[ATK] AX: figure out platform difference for ATK to make accessibility/table-cell-display-block.html work https://bugs.webkit.org/show_bug.cgi?id=143083 Reviewed by Chris Fleizach. Source/WebCore: The main platform difference was that ATK was mapping the td element to the accessible table cell, and the render block resulting from the style wound up being the cell parent. In contrast, AX API was mapping the cell element to an AXGroup which was a child of the AXCell. Rather than try to bend yet another case to the will of our individual platforms' table needs, it made more sense to clean up the code that is competing and move toward more platform-unified handling. This is the first step in that direction, with ATK moving closer toward the WebCore/AX API mapping. No new tests. Instead, modified and fixed the test which was being skipped for GTK, and also updated the expectations of some Mac tests whose FIXMEs should now be fixed. * accessibility/AccessibilityNodeObject.cpp: (WebCore::AccessibilityNodeObject::supportsRequiredAttribute): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::determineAccessibilityRole): * accessibility/AccessibilityTable.cpp: (WebCore::AccessibilityTable::computeIsTableExposableThroughAccessibility): * accessibility/AccessibilityTableCell.cpp: (WebCore::AccessibilityTableCell::determineAccessibilityRole): * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: (createAccessibilityRoleMap): LayoutTests: * accessibility/roles-computedRoleString-expected.txt: Updated to reflect fixed FIXME. * accessibility/roles-computedRoleString.html: Updated to reflect fixed FIXME. * accessibility/table-cell-display-block-expected.txt: Modified to be more platform agnostic. * accessibility/table-cell-display-block.html: Modified to be more platform agnostic. * platform/efl/accessibility/table-detection-expected.txt: Updated to reflect mapping change. * platform/gtk/TestExpectations: Unskip failing test from opening report. * platform/gtk/accessibility/table-detection-expected.txt: Updated to reflect mapping change. * platform/mac/accessibility/rowheader-outside-table-role-expected.txt: Updated to reflect mapping change. * platform/mac/accessibility/rowheader-outside-table-role.html: Updated to reflect mapping change. Canonical link: https://commits.webkit.org/162633@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183798 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-05-05 07:39:23 +00:00
shouldBeFalse("cell2.role == 'AXRole: AXCell'");
document.getElementById("content").style.visibility = "hidden";
}
</script>
<script src="../resources/js-test-post.js"></script>
</body>
</html>