Access key should work on all elements.
[WebKit-https.git] / LayoutTests / fast / forms / access-key-for-all-elements.html
1 <html>
2 <head>
3 <script src="../js/resources/js-test-pre.js"></script>
4 </head>
5 <body>
6 <p>This test checks to see if accesskey attributes works all elements.</p>
7 <div id="test"></div>
8 <div id="console"></div>
9
10 <script>
11 if (window.layoutTestController)
12     layoutTestController.dumpAsText();
13
14 var test = new Array("a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdo","bgsound","big","blockquote",
15                      "body","br","button","canvas","caption","center","cite","code","col","colgroup","command","datalist","dd","del","details","dfn","dir","div","dl","dt",
16                      "em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html",
17                      "i","iframe","img","input","ins","isindex","kbd","keygen","label","layer","legend","li","link","listing","map","mark","marquee","menu","meta","meter","nav",
18                      "nobr","noembed","noframes","nolayer","noscript","object","ol","optgroup","option","output","p","param","plaintext","pre","progress","q","rp","rt","ruby","s",
19                      "samp","script","section","select","small","source","span","strike","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead",
20                      "title","tr","track","tt","u","ul","var","video","wbr","xmp");
21
22 for (var i =0 ; i < test.length; i++) {
23     var parent = document.createElement(test[i]);
24     document.body.appendChild(parent);
25     var test_me = document.getElementsByTagName(test[i])[0];
26     debug('Check for ' + test_me.tagName + ' tag');
27     shouldBeDefined('test_me.accessKey');
28     test_me.accessKey ='k';
29     accesskey = test_me.accessKey; 
30     shouldBe('accesskey',"'k'");
31     debug('');
32 }
33 </script>
34
35 </body>
36 </html>