| <!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); |
| shouldBeFalse("cell2.role == 'AXRole: AXCell'"); |
| |
| document.getElementById("content").style.visibility = "hidden"; |
| } |
| |
| </script> |
| |
| <script src="../resources/js-test-post.js"></script> |
| </body> |
| </html> |