| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <html> |
| <head> |
| <script src="../resources/js-test-pre.js"></script> |
| <script> |
| |
| function runTest() |
| { |
| if (window.accessibilityController) { |
| |
| tbutton1 = accessibilityController.accessibleElementById("tbutton"); |
| debug("Role: " + tbutton1.role); |
| shouldBe("tbutton1.title", "'AXTitle: Toggle button'"); |
| |
| button = accessibilityController.accessibleElementById("button"); |
| debug("Role: " + button.role); |
| shouldBe("button.title", "'AXTitle: Button title'"); |
| } |
| } |
| </script> |
| |
| </head> |
| <body id="body" onload="runTest()"> |
| |
| <a id="tbutton" tabindex="0" class="button" role="button" aria-pressed="true">Toggle button</a> |
| |
| <div> |
| <button type="button" id="button" role="button"/> |
| <label>Button title</label> |
| </div> |
| |
| <p id="description"></p> |
| <div id="console"></div> |
| |
| <script> |
| description("This tests that a toggle button properly exposes the title when there isn't a direct relation and textUnderElement is required to be used."); |
| |
| </script> |
| <script src="../resources/js-test-post.js"></script> |
| </body> |
| </html> |