--- /dev/null
+This test checks to see if accesskey attributes works on the specified elements.
+
+If this test passes you should see 1 - 9 and a, b and c clicked or focussed.
+
+
+
+
+1 button clicked
+2 input type button focussed
+3 input type checkbox focussed
+4 input type text focussed
+5 input type submit clicked
+6 input type reset clicked
+7 link clicked
+8 input type associated to legend focussed
+9 input type associated to label around input focussed
+a input type associated to label closed before input focussed
+b area 1 clicked
+c area 2 clicked
+
--- /dev/null
+<html>
+<head>
+<script>
+function log(message)
+{
+ var item = document.createElement("li");
+ item.appendChild(document.createTextNode(message));
+ document.getElementById("console").appendChild(item);
+}
+function pressKey(key)
+{
+ var event = document.createEvent("KeyboardEvent");
+ event.initKeyboardEvent("keydown", true, true, document.defaultView, key, 0, true, false, false, false, false);
+ document.dispatchEvent(event);
+}
+function test()
+{
+ if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+
+ for(i = 1; i <= 9; i++) {
+ pressKey(i);
+ }
+ pressKey("a");
+ pressKey("b");
+ pressKey("c");
+ pressKey("d");
+}
+</script>
+</head>
+<body onload="test()">
+<p>This test checks to see if accesskey attributes works on the specified elements.</p>
+<p>If this test passes you should see 1 - 9 and a, b and c clicked or focussed.</p>
+<hr>
+<p>
+<button accesskey="1" onclick="log('1 button clicked')"></button>
+<input type="button" value="Click me!" accesskey="2" onfocus="log('2 input type button focussed')"/>
+<input type="checkbox" accesskey="3" onfocus="log('3 input type checkbox focussed')"/>
+<input type="text" accesskey="4" onfocus="log('4 input type text focussed')"/>
+<input type="submit" accesskey="5" onfocus="log('5 input type submit clicked')"/>
+<input type="reset" accesskey="6" onfocus="log('6 input type reset clicked')"/>
+<a href="#" accesskey="7" onclick="log('7 link clicked')"></a>
+<fieldset><legend accesskey="8"></legend><input type="text" onfocus="log('8 input type associated to legend focussed')"/></fieldset>
+<label accesskey="9" for="test1"><input type="text" id="test1" onfocus="log('9 input type associated to label around input focussed')"/></label>
+<label accesskey="a" for="test2"></label><input type="text" id="test2" onfocus="log('a input type associated to label closed before input focussed')"/>
+<map name="mymap">
+ <area accesskey="b" shape="rect" coords="0,0,5,10" alt="" href="#" onclick="log('b area 1 clicked')">
+ <area accesskey="c" shape="rect" coords="6,0,10,10" alt="" href="#" onclick="log('c area 2 clicked')">
+</map>
+<img usemap="#mymap" alt="pic" src="#" height="10" width="10"/>
+</p>
+<hr>
+<ol id="console"></ol>
+</body>
+</html>
+2005-06-29 Geoffrey Garen <ggaren@apple.com>
+
+ Patch by Joost de Valk <webkit@joostdevalk.nl>
+
+ - http://bugzilla.opendarwin.org/show_bug.cgi?id=3732
+ Testcase for accesskeys that will run with run-webkit-tests.
+
+ Reviewed by Darin.
+
+ Test cases added:
+ * layout-tests/fast/forms/access-key-expected.txt: Added.
+ * layout-tests/fast/forms/access-key.html: Added.
+
2005-06-29 Justin Garcia <justin.garcia@apple.com>
Patch by Anders Carlsson <andersca@mac.com>