summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/forms/legend-access-key.html
blob: 8fea663135b7501959e6bc6b6a67fe31f4a6bab0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<html>
<head>
<script>
function log(message)
{
    var item = document.createElement("li");
    item.appendChild(document.createTextNode(message));
    document.getElementById("console").appendChild(item);
}
function test()
{
    if (window.testRunner) {
        testRunner.dumpAsText();

        if (navigator.userAgent.search(/\bMac OS X\b/) != -1)
            modifiers = ["ctrlKey", "altKey"];
        else
            modifiers = "altKey";
        eventSender.keyDown("f", modifiers);
    }
}
</script>
</head>
<body onload="test()">
<p>This test checks to see if accesskey attributes work on legend elements.</p>
<p>If the test passes, you should see one line saying "focused" and the text field should have focus.</p>
<hr>
<p><fieldset><legend accesskey="f">Information:</legend><input onfocus="log('focused')" type="text"></fieldset><p>
<hr>
<ol id="console"></ol>
</body>
</html>