Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / accessibility / disabled-controls-not-focusable.html
blob39d5e988b64d46a2c3aca565b3849c2e4145790f
1 <!DOCTYPE HTML>
2 <html>
3 <body>
4 <script src="../resources/js-test.js"></script>
6 <div>
7 <button id="button"></button>
8 <input id="text" type="text">
9 <input id="checkbox" type="checkbox">
10 <input id="radio" type="radio">
11 <input id="submit" type="submit">
12 <input id="slider" type="range">
13 <select id="combobox"><option>1<option>2</select>
14 <select id="listbox" multiple><option>1<option>2</select>
15 <textarea id="textarea"></textarea>
16 </div>
18 <div id="console"></div>
19 <script>
20 description("This test makes sure that disabled form controls are not exposed as focusable.");
22 if (window.testRunner && window.accessibilityController) {
23 window.testRunner.dumpAsText();
25 function checkControl(id) {
26 window.element = document.getElementById(id);
27 debug(element.id);
28 element.focus();
29 window.axElement = accessibilityController.focusedElement;
30 shouldBeTrue("axElement.isFocusable");
31 element.disabled = true;
32 shouldBeFalse("axElement.isFocusable");
35 checkControl("button");
36 checkControl("text");
37 checkControl("checkbox");
38 checkControl("radio");
39 checkControl("submit");
40 checkControl("slider");
41 checkControl("combobox");
42 checkControl("listbox");
43 checkControl("textarea");
46 </script>
48 </body>
49 </html>