OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| 2 <html> |
| 3 <head> |
| 4 <script src="../resources/js-test.js"></script> |
| 5 </head> |
| 6 <body> |
| 7 |
| 8 <div id="list" role="list"> |
| 9 <div role="listitem" aria-setSize="10" aria-posinset="3"></div> |
| 10 <div role="listitem" aria-setSize="10" aria-posinset="5"></div> |
| 11 </div> |
| 12 |
| 13 <div id="listbox" role="listbox"> |
| 14 <div role="option"></div> |
| 15 <div role="option"></div> |
| 16 <div role="option"></div> |
| 17 <div role="option"></div> |
| 18 </div> |
| 19 |
| 20 <p id="description"></p> |
| 21 <div id="console"></div> |
| 22 |
| 23 <script> |
| 24 description("This tests that aria-posinset and aria-setsize are exposed to acces
sibility correctly."); |
| 25 |
| 26 if (window.accessibilityController) { |
| 27 |
| 28 var list = accessibilityController.accessibleElementById("list"); |
| 29 |
| 30 shouldBe("list.childAtIndex[0].setSize", "10"); |
| 31 shouldBe("list.childAtIndex[1].setSize", "10"); |
| 32 shouldBe("list.childAtIndex[0].posInSet", "3"); |
| 33 shouldBe("list.childAtIndex[1].posInSet", "5"); |
| 34 |
| 35 var listbox = document.getElementById("listbox"); |
| 36 |
| 37 shouldBe("listbox.childAtIndex[0].setSize", "4"); |
| 38 shouldBe("listbox.childAtIndex[1].setSize", "4"); |
| 39 shouldBe("listbox.childAtIndex[2].setSize", "4"); |
| 40 shouldBe("listbox.childAtIndex[3].setSize", "4"); |
| 41 shouldBe("listbox.childAtIndex[0].posInSet", "1"); |
| 42 shouldBe("listbox.childAtIndex[1].posInSet", "2"); |
| 43 shouldBe("listbox.childAtIndex[2].posInSet", "3"); |
| 44 shouldBe("listbox.childAtIndex[3].posInSet", "4"); |
| 45 } |
| 46 </script> |
| 47 |
| 48 </body> |
| 49 </html> |
OLD | NEW |