| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <html> |
| <head> |
| <script src="../resources/js-test.js"></script> |
| </head> |
| <body id="body"> |
| <input type="text" aria-disabled="true" size=20> |
| <input type="text" aria-disabled="false" size=20> |
| <div role="group" id="group1" aria-disabled="true"> |
| <div role="group"> |
| <a id="link1" href="#">link</a> |
| <button id="button1" type="submit" aria-disabled="false">submit</button> |
| <div> |
| <div> |
| </div> |
| <p id="description"></p> |
| <div id="console"></div> |
| |
| <script> |
| |
| description("This tests that the aria-disabled attribute works. The text field should not be enabled."); |
| |
| if (window.accessibilityController) { |
| |
| var body = document.getElementById("body"); |
| body.focus(); |
| var textField = accessibilityController.focusedElement.childAtIndex(0).childAtIndex(0); |
| shouldBe("textField.isEnabled", "false"); |
| |
| textField = accessibilityController.focusedElement.childAtIndex(0).childAtIndex(1); |
| shouldBe("textField.isEnabled", "true"); |
| |
| var group = accessibilityController.accessibleElementById("group1"); |
| shouldBe("group.isEnabled", "false"); |
| |
| var link = accessibilityController.accessibleElementById("link1"); |
| shouldBe("link.isEnabled", "false"); |
| |
| var button = accessibilityController.accessibleElementById("button1"); |
| shouldBe("button.isEnabled", "true"); |
| } |
| |
| </script> |
| |
| </body> |
| </html> |