blob: b6da07d7d5994e98b4c945a7601d37fd4c9d81c7 [file] [log] [blame]
cfleizach@apple.com96bd4a02010-03-15 22:07:20 +00001<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2<html>
3<head>
ap@apple.comfcade892017-05-19 23:37:59 +00004<script src="../resources/js-test.js"></script>
cfleizach@apple.com96bd4a02010-03-15 22:07:20 +00005</head>
6
7<body id="body">
8
ap@apple.comfcade892017-05-19 23:37:59 +00009<label tabindex=0 onclick="finishJSTest()" id="labelElement">label</label>
cfleizach@apple.com96bd4a02010-03-15 22:07:20 +000010
11<p id="description"></p>
12<div id="console"></div>
13
14<script>
15
16 description("This tests that a label element without a corresponding control will perform a press action on itself instead of nothing.");
ap@apple.comfcade892017-05-19 23:37:59 +000017 jsTestIsAsync = true;
cfleizach@apple.com96bd4a02010-03-15 22:07:20 +000018
19 if (window.accessibilityController) {
cfleizach@apple.com96bd4a02010-03-15 22:07:20 +000020 document.getElementById("body").focus();
21 var body = accessibilityController.focusedElement;
22 var label = body.childAtIndex(0).childAtIndex(0);
23
24 // if successful, performEvent() will be called and we'll successfully parse.
25 label.press();
26 }
27
cfleizach@apple.com96bd4a02010-03-15 22:07:20 +000028</script>
cfleizach@apple.com96bd4a02010-03-15 22:07:20 +000029</body>
30</html>