OLD | NEW |
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../resources/js-test.js"></script> | 4 <script src="../resources/js-test.js"></script> |
5 </head> | 5 </head> |
6 <body id="body"> | 6 <body id="body"> |
7 | 7 |
8 <div id="content"> | 8 <div id="content"> |
9 | 9 |
10 <table id="table" border=1> | 10 <table id="table" border=1> |
11 <caption> TableCaption </caption> | 11 <caption> TableCaption </caption> |
12 <tr><td>foo</td><td>bar</td></tr> | 12 <tr><td>foo</td><td>bar</td></tr> |
13 </table> | 13 </table> |
14 | 14 |
15 </div> | 15 </div> |
16 | 16 |
17 <script> | 17 <script> |
18 | 18 |
19 description("This tests that table caption element is exposed for accessibil
ity."); | 19 description("This tests that table caption element is exposed for accessibil
ity."); |
20 | 20 |
21 if (window.accessibilityController) { | 21 if (window.accessibilityController) { |
22 var table = accessibilityController.accessibleElementById("table"); | 22 var table = accessibilityController.accessibleElementById("table"); |
23 shouldBe("table.childrenCount", "5"); | 23 shouldBe("table.childrenCount", "5"); |
24 window.captionText = table.childAtIndex(0).childAtIndex(0).stringValue; | 24 window.captionText = table.childAtIndex(0).childAtIndex(0).name; |
25 shouldBe("captionText", "'AXValue: TableCaption'"); | 25 shouldBe("captionText", "'TableCaption'"); |
26 // Clear the HTML for cleaner results. | 26 // Clear the HTML for cleaner results. |
27 document.getElementById("content").innerHTML = ""; | 27 document.getElementById("content").innerHTML = ""; |
28 } | 28 } |
29 | 29 |
30 | 30 |
31 </script> | 31 </script> |
32 | 32 |
33 </body> | 33 </body> |
34 </html> | 34 </html> |
35 | |
OLD | NEW |