| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | |
| 2 <html> | |
| 3 <head> | |
| 4 <script src="../fast/js/resources/js-test-pre.js"></script> | |
| 5 </head> | |
| 6 <body id="body"> | |
| 7 | |
| 8 <div id="combo" tabindex=0 role="combobox" aria-expanded="false" aria-label="Tes
t"> | |
| 9 <div role="listbox"> | |
| 10 <div role="option">option 1</div> | |
| 11 <div role="option">option 2</div> | |
| 12 </div> | |
| 13 </div> | |
| 14 | |
| 15 | |
| 16 <p id="description"></p> | |
| 17 <div id="console"></div> | |
| 18 | |
| 19 <script> | |
| 20 | |
| 21 description("This tests that the aria roles for combobox and aria-expanded w
ork correctly in conjunction."); | |
| 22 | |
| 23 if (window.accessibilityController) { | |
| 24 | |
| 25 var combobox = document.getElementById("combo"); | |
| 26 combobox.focus(); | |
| 27 | |
| 28 combobox = accessibilityController.focusedElement; | |
| 29 | |
| 30 debug("Role: " + combobox.role); | |
| 31 shouldBe("combobox.isExpanded", "false"); | |
| 32 | |
| 33 combobox.showMenu(); | |
| 34 | |
| 35 // As of now, the isExpanded value won't be updated through an AX call
. | |
| 36 shouldBe("combobox.isExpanded", "false"); | |
| 37 | |
| 38 var firstChild = combobox.childAtIndex(0); | |
| 39 debug("Role: " + firstChild.role); | |
| 40 } | |
| 41 | |
| 42 </script> | |
| 43 | |
| 44 <script src="../fast/js/resources/js-test-post.js"></script> | |
| 45 </body> | |
| 46 </html> | |
| OLD | NEW |