blob: 08cdbafb3cbef3596e602debcd8f865719e6b6e5 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
</head>
<body id="body">
<div id="content">
<table id="table" border=1>
<caption> TableCaption </caption>
<tr><td>foo</td><td>bar</td></tr>
</table>
</div>
<script>
test((t) => {
var table = accessibilityController.accessibleElementById("table");
assert_equals(table.childrenCount, 2);
window.captionText = table.childAtIndex(0).childAtIndex(0).name;
assert_equals(captionText, 'TableCaption');
// Clear the HTML for cleaner results.
document.getElementById("content").innerHTML = "";
}
,"This tests that table caption element is exposed for accessibility.");
</script>
</body>
</html>