Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
AX: Table with CSS that makes a row anonymous can return NULL from ce…
…llForColumnAndRow https://bugs.webkit.org/show_bug.cgi?id=148293 Patch by Doug Russell <d_russell@apple.com> on 2015-08-21 Reviewed by Chris Fleizach. When RenderTableRows are anonymous, they may not be added to the accessible data table's internal row list. However, when calculating the row range for a cell, we were still accounting for those anonymous sections. Change how the row range is calculated to directly ask the accessible parent row for its index. This will ensure it’s more inline with what’s being represented to the accessibility API. Source/WebCore: Test: accessibility/aria-table-content.html * accessibility/AccessibilityTableCell.cpp: (WebCore::AccessibilityTableCell::parentRow): (WebCore::AccessibilityTableCell::rowIndexRange): * accessibility/AccessibilityTableCell.h: LayoutTests: * accessibility/aria-table-content-expected.txt: Added. * accessibility/aria-table-content.html: Added. Canonical link: https://commits.webkit.org/166419@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188769 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
2b0b7ca
commit 5be31db
Showing
6 changed files
with
106 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Header | ||
Item 1 | ||
|
||
This tests that in an aria table with CSS that makes a row anonymous, the cells can be accessed. | ||
|
||
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". | ||
|
||
|
||
PASS cell00.role is 'AXRole: AXCell' | ||
PASS cell01.role is 'AXRole: AXCell' | ||
PASS cell00.isEqual(table.rowAtIndex(0).childAtIndex(0)) is true | ||
PASS cell01.isEqual(table.rowAtIndex(1).childAtIndex(0)) is true | ||
PASS successfullyParsed is true | ||
|
||
TEST COMPLETE | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<script src="../resources/js-test-pre.js"></script> | ||
<style type="text/css"> | ||
div.foo table:not(.no-header):before{content:'';} | ||
</style> | ||
<title>Table Anonymous Row</title> | ||
</head> | ||
<body> | ||
<div class="foo" role="grid" id="table"> | ||
<table> | ||
<thead> <tr> <th>Header</th> </tr> </thead> | ||
<tbody> <tr> <td> <p>Item 1</p> </td> </tr> </tbody> | ||
</table> | ||
</div> | ||
|
||
<p id="description"></p> | ||
<div id="console"></div> | ||
|
||
<script> | ||
description("This tests that in an aria table with CSS that makes a row anonymous, the cells can be accessed."); | ||
|
||
if (window.accessibilityController) { | ||
var table = accessibilityController.accessibleElementById("table"); | ||
var cell00 = table.cellForColumnAndRow(0,0); | ||
shouldBe("cell00.role", "'AXRole: AXCell'"); | ||
var cell01 = table.cellForColumnAndRow(0,1); | ||
shouldBe("cell01.role", "'AXRole: AXCell'"); | ||
shouldBeTrue("cell00.isEqual(table.rowAtIndex(0).childAtIndex(0))"); | ||
shouldBeTrue("cell01.isEqual(table.rowAtIndex(1).childAtIndex(0))"); | ||
} | ||
|
||
</script> | ||
|
||
<script src="../resources/js-test-post.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters