+2007-11-08 Darin Adler <darin@apple.com>
+
+ Reviewed by Adam.
+
+ - test changes for <rdar://problem/5552943> accesskey does not focus <button> elements
+
+ * fast/forms/access-key.html: Check for both focus and click events on all elements, but
+ resisted the urge to switch to the American spelling for "focused".
+
+ * fast/forms/access-key-expected.txt: Updated to reflect the bug fix ("1 button focussed"),
+ the fact that <input type=button>, <input type=checkbox>, <input type=submit>, and
+ <input type=reset> are all both focused and clicked ("2 input type button clicked",
+ "3 input type checkbox clicked", "5 input type submit focussed", and
+ "6 input type reset focussed"). Unfortunately this now also demonstrates that we don't
+ send a click to <input type=text> and Gecko does. And there are still quite a few types
+ that are not covered.
+
2007-11-07 David Kilzer <ddkilzer@apple.com>
WebKit confuses width/height for Media Queries device-aspect-ratio evaluation
+1 button focussed
1 button clicked
2 input type button focussed
+2 input type button clicked
3 input type checkbox focussed
+3 input type checkbox clicked
4 input type text focussed
+5 input type submit focussed
5 input type submit clicked
+6 input type reset focussed
6 input type reset clicked
7 link clicked
8 input type associated to legend focussed
if (window.layoutTestController)
layoutTestController.dumpAsText();
- for(i = 1; i <= 9; i++) {
+ for (i = 1; i <= 9; i++)
pressKey(i);
- }
pressKey("a");
pressKey("b");
pressKey("c");
- pressKey("d");
}
</script>
</head>
<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')"/>
+<button accesskey="1" onfocus="log('1 button focussed')" onclick="log('1 button clicked')"></button>
+<input type="button" value="Click me!" accesskey="2" onfocus="log('2 input type button focussed')" onclick="log('2 input type button clicked')">
+<input type="checkbox" accesskey="3" onfocus="log('3 input type checkbox focussed')" onclick="log('3 input type checkbox clicked')">
+<input type="text" accesskey="4" onfocus="log('4 input type text focussed')" onclick="log('4 input type text clicked')">
+<input type="submit" accesskey="5" onfocus="log('5 input type submit focussed')" onclick="log('5 input type submit clicked')">
+<input type="reset" accesskey="6" onfocus="log('6 input type reset focussed')" onclick="log('6 input type reset clicked')">
+<a href="#" accesskey="7" onfocus="log('7 link focussed')" onclick="log('7 link clicked')"></a>
+<fieldset><legend accesskey="8"></legend><input type="text" onfocus="log('8 input type associated to legend focussed')" onclick="log('8 input type associated to legend clicked')"></fieldset>
+<label accesskey="9" for="test1"><input type="text" id="test1" onfocus="log('9 input type associated to label around input focussed')" onclick="log('9 input type associated to label around input clicked')"></label>
+<label accesskey="a" for="test2"></label><input type="text" id="test2" onfocus="log('a input type associated to label closed before input focussed')" onclick="log('a input type associated to label closed before input clicked')">
<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')">
+ <area accesskey="b" shape="rect" coords="0,0,5,10" alt="" href="#" onfocus="log('b area 1 focussed')" onclick="log('b area 1 clicked')">
+ <area accesskey="c" shape="rect" coords="6,0,10,10" alt="" href="#" onfocus="log('c area 2 focussed')" onclick="log('c area 2 clicked')">
</map>
-<img usemap="#mymap" alt="pic" src="#" height="10" width="10"/>
+<img usemap="#mymap" alt="pic" src="#" height="10" width="10">
</p>
<hr>
<ol id="console"></ol>