| 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 <script> | 5 <script> |
| 6 | 6 |
| 7 function runTest() | 7 function runTest() |
| 8 { | 8 { |
| 9 if (window.accessibilityController) { | 9 if (window.accessibilityController) { |
| 10 | 10 |
| 11 document.getElementById("tbutton").focus(); | 11 document.getElementById("tbutton").focus(); |
| 12 tbutton1 = accessibilityController.focusedElement; | 12 tbutton1 = accessibilityController.focusedElement; |
| 13 debug("Role: " + tbutton1.role); | 13 debug("Role: " + tbutton1.role); |
| 14 shouldBe("tbutton1.deprecatedTitle", "'AXTitle: Toggle button'"); | 14 shouldBe("tbutton1.name", "'Toggle button'"); |
| 15 | 15 |
| 16 document.getElementById("button").focus(); | 16 document.getElementById("button").focus(); |
| 17 button = accessibilityController.focusedElement; | 17 button = accessibilityController.focusedElement; |
| 18 debug("Role: " + button.role); | 18 debug("Role: " + button.role); |
| 19 shouldBe("button.deprecatedTitle", "'AXTitle: Button title'"); | 19 shouldBe("button.name", "'Button title'"); |
| 20 } | 20 } |
| 21 } | 21 } |
| 22 </script> | 22 </script> |
| 23 | 23 |
| 24 </head> | 24 </head> |
| 25 <body id="body" onload="runTest()"> | 25 <body id="body" onload="runTest()"> |
| 26 | 26 |
| 27 <a id="tbutton" tabindex="0" class="button" role="button" aria-pressed="true">To
ggle button</a> | 27 <a id="tbutton" tabindex="0" class="button" role="button" aria-pressed="true">To
ggle button</a> |
| 28 | 28 |
| 29 <div> | 29 <div> |
| 30 <button type="button" id="button" role="button"/> | 30 <button type="button" id="button" role="button"/> |
| 31 <label>Button title</label> | 31 <label>Button title</label> |
| 32 </div> | 32 </div> |
| 33 | 33 |
| 34 <p id="description"></p> | 34 <p id="description"></p> |
| 35 <div id="console"></div> | 35 <div id="console"></div> |
| 36 | 36 |
| 37 <script> | 37 <script> |
| 38 description("This tests that a toggle button properly exposes the title when the
re isn't a direct relation and textUnderElement is required to be used."); | 38 description("This tests that a toggle button properly exposes the title when the
re isn't a direct relation and textUnderElement is required to be used."); |
| 39 | 39 |
| 40 </script> | 40 </script> |
| 41 </body> | 41 </body> |
| 42 </html> | 42 </html> |
| OLD | NEW |