| <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.layoutTestController) |
| layoutTestController.dumpAsText(); |
| |
| var event = document.createEvent("KeyboardEvent"); |
| event.initKeyboardEvent("keydown", true, true, document.defaultView, "f", 0, true, false, false, false, false); |
| document.dispatchEvent(event); |
| } |
| </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> |