| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <html> |
| <head> |
| <script src="../resources/js-test.js"></script> |
| </head> |
| |
| <body id="body"> |
| |
| <label tabindex=0 onclick="finishJSTest()" id="labelElement">label</label> |
| |
| <p id="description"></p> |
| <div id="console"></div> |
| |
| <script> |
| |
| description("This tests that a label element without a corresponding control will perform a press action on itself instead of nothing."); |
| jsTestIsAsync = true; |
| |
| if (window.accessibilityController) { |
| document.getElementById("body").focus(); |
| var body = accessibilityController.focusedElement; |
| var label = body.childAtIndex(0).childAtIndex(0); |
| |
| // if successful, performEvent() will be called and we'll successfully parse. |
| label.press(); |
| } |
| |
| </script> |
| </body> |
| </html> |