| <!DOCTYPE HTML> |
| <html> |
| <body> |
| <script src="../resources/js-test-pre.js"></script> |
| |
| <div> |
| <button id="button"></button> |
| <input id="text" type="text"> |
| <input id="checkbox" type="checkbox"> |
| <input id="radio" type="radio"> |
| <input id="submit" type="submit"> |
| <input id="slider" type="range"> |
| <select id="combobox"><option>1<option>2</select> |
| <select id="listbox" multiple><option>1<option>2</select> |
| <textarea id="textarea"></textarea> |
| </div> |
| |
| <div id="console"></div> |
| <script> |
| description("This test makes sure that disabled form controls are not exposed as focusable."); |
| |
| if (window.testRunner && window.accessibilityController) { |
| window.testRunner.dumpAsText(); |
| |
| function checkControl(id) { |
| window.element = document.getElementById(id); |
| debug(element.id); |
| element.focus(); |
| window.axElement = accessibilityController.focusedElement; |
| shouldBeTrue("axElement.isFocusable"); |
| element.disabled = true; |
| shouldBeFalse("axElement.isFocusable"); |
| } |
| |
| checkControl("button"); |
| checkControl("text"); |
| checkControl("checkbox"); |
| checkControl("radio"); |
| checkControl("submit"); |
| checkControl("slider"); |
| checkControl("combobox"); |
| checkControl("listbox"); |
| checkControl("textarea"); |
| } |
| |
| </script> |
| |
| <script src="../resources/js-test-post.js"></script> |
| </body> |
| </html> |