Changeset 57 for collected/trunk

Show
Ignore:
Timestamp:
02/15/08 11:52:58 (11 months ago)
Author:
simon
Message:

added imgs to the tabindex-and-focus.html test file

Location:
collected/trunk/html-test-cases
Files:
1 added
1 modified

Legend:

Unmodified
Added
Removed
  • collected/trunk/html-test-cases/tabindex-and-focus.html

    r40 r57  
    77<title>tabindex and focus</title> 
    88<style type="text/css"> 
    9 div, input { 
     9div, input, img { 
    1010        border-color: #000; 
    1111        border-style: solid; 
    1212} 
    13 div { 
     13div, img { 
    1414        border-width: 0px; 
    1515} 
    1616input { 
    1717        border-width: 1px; 
     18        margin: 5px; 
    1819} 
    19 div.focused, input.focused { 
     20div.focused, input.focused, img.focused { 
    2021        border-width: 5px; 
    2122} 
     
    2324<script type="text/javascript"> 
    2425function focusElem(id){ 
    25         document.getElementById(id).focus(); 
     26        setTimeout(function(){ 
     27                document.getElementById(id).focus(); 
     28        }, 0); 
    2629} 
    2730function highlight(elem){ 
     
    3538 
    3639<body> 
     40 
    3741<div id="div-no-tabindex" onfocus="highlight(this)" onblur="unhighlight(this)" 
    3842        >div no tabindex</div> 
     
    4145<div id="div-tabindex-0" tabindex="0" onfocus="highlight(this)" 
    4246        onblur="unhighlight(this)">div tabindex="0"</div> 
     47 
     48<p> 
     49<input id="input-no-tabindex" value="input no tabindex" 
     50        onfocus="highlight(this)" onblur="unhighlight(this)"> 
     51<br> 
     52<input id="input-tabindex-minus-1" tabindex="-1" 
     53        value='input tabindex="-1"' 
     54        onfocus="highlight(this)" onblur="unhighlight(this)"> 
     55<br> 
     56<input id="input-tabindex-0" tabindex="0" value='input tabindex="0"' 
     57        onfocus="highlight(this)" onblur="unhighlight(this)"> 
     58</p> 
     59 
     60<p> 
     61img no tabindex: <img id="img-no-tabindex" src="greenbox.png" alt="green box" 
     62        onfocus="highlight(this)" onblur="unhighlight(this)"> 
     63<br> 
     64img tabindex="-1": <img id="img-tabindex-minus-1" src="greenbox.png" 
     65        alt="green box" tabindex="-1" 
     66        onfocus="highlight(this)" onblur="unhighlight(this)"> 
     67<br> 
     68img tabindex="0": <img id="img-tabindex-0" src="greenbox.png" alt="green box" 
     69        tabindex="0" 
     70        onfocus="highlight(this)" onblur="unhighlight(this)"> 
     71</p> 
     72 
     73<hr> 
     74 
    4375<div> 
    44 <input id="input-no-tabindex" value="input with no tabindex" 
    45         onfocus="highlight(this)" onblur="unhighlight(this)"> 
    46 <input id="input-tabindex-minus-1" tabindex="-1" 
    47         value='input with tabindex="-1"' 
    48         onfocus="highlight(this)" onblur="unhighlight(this)"> 
    49 <input id="input-tabindex-0" tabindex="0" value='input with tabindex="0"' 
    50         onfocus="highlight(this)" onblur="unhighlight(this)"> 
     76<button onclick='focusElem("div-no-tabindex")'>focus div no tabindex</button><br> 
     77<button onclick='focusElem("div-tabindex-minus-1")'>focus div tabindex="-1"</button><br> 
     78<button onclick='focusElem("div-tabindex-0")'>focus div tabindex="0"</button><br> 
     79<button onclick='focusElem("input-no-tabindex")'>focus input no tabindex</button><br> 
     80<button onclick='focusElem("input-tabindex-minus-1")'>focus input tabindex="-1"</button><br> 
     81<button onclick='focusElem("input-tabindex-0")'>focus input tabindex="0"</button><br> 
     82<button onclick='focusElem("img-no-tabindex")'>focus img no tabindex</button><br> 
     83<button onclick='focusElem("img-tabindex-minus-1")'>focus img tabindex="-1"</button><br> 
     84<button onclick='focusElem("img-tabindex-0")'>focus img tabindex="0"</button> 
    5185</div> 
    52 <hr> 
    53 <div> 
    54 <button onclick='focusElem("div-no-tabindex")'>focus div no tabindex</button> 
    55 <button onclick='focusElem("div-tabindex-minus-1")'>focus div tabindex="-1"</button> 
    56 <button onclick='focusElem("div-tabindex-0")'>focus div tabindex="0"</button> 
    57 <button onclick='focusElem("input-no-tabindex")'>focus input no tabindex</button> 
    58 <button onclick='focusElem("input-tabindex-minus-1")'>focus input tabindex="-1"</button> 
    59 <button onclick='focusElem("input-tabindex-0")'>focus input tabindex="0"</button> 
    60 </div> 
     86 
    6187</body> 
    6288