<?xml version="1.0"?>
<!DOCTYPE testsuite SYSTEM "http://www.w3.org/WAI/UA/TS/dtd/uaag-testsuite-2.dtd">


<testsuite id="ts0102-onfocus-onblur-label">
	
	<metaInfo>
		<testTitle>ONFOCUS and ONBLUR attributes for LABEL elements</testTitle>
		<shortTitle>ONFOCUS and ONBLUR events for LABEL controls</shortTitle>		
		<testElement>
			<elementName>ONFOCUS</elementName>
			<hlink href="http://www.w3.org/TR/html401/interact/scripts.html#h-18.2.3">&hspec; ONFOCUS</hlink>
		</testElement>
		<testElement>
			<elementName>ONBLUR</elementName>
			<hlink href="http://www.w3.org/TR/html401/interact/scripts.html#h-18.2.3">&hspec; ONBLUR</hlink>
		</testElement>
		<testElement>
			<elementName>LABEL</elementName>
			<hlink href="http://www.w3.org/TR/html401/interact/forms.html#edef-LABEL">&hspec; LABEL</hlink>
		</testElement>				
		<creator>Dominique Kilman</creator>
		<creator>Colin Koteles</creator>		
		
				
		<metaElement></metaElement>
		<testStyle></testStyle>
	</metaInfo>
	
	<requirementInfo>
   	<checkpoints>
      	<checkpoint xref="tech-device-independent-handlers">
         	<provisions>
            	<provision xref="tech-device-independent-handlers-1"/>
            </provisions>
         </checkpoint>
      </checkpoints>
 	</requirementInfo>
	
	<content>
		
		
		
		<test section="1">
			<procedure>
				<list>
					<item>Using the keyboard or an assistive technology that emulates the keyboard, move focus to the input control label to trigger the onFocus event.</item>
					<item>Using the keyboard or an assistive technology that emulates the keyboard, move focus off the input control label to trigger the onBlur event.</item>
				</list>
			</procedure>
			<testCode>
				<table summary="layout table"><tbody>
  					<tr><td>
      				<form action="../action/return.html" method="post">
							<label onblur="blurTest('../images/clear.gif')" onfocus="focusTest('../images/starRed.gif')" for="button1">
								Label for test button: </label>
							<button id="button1" name="button1">Test</button>
						</form>
						</td>
    					<td>
      					<table border="1"><tbody>
        						<tr><td>
									<img id="redStar" height="35" alt="red star" src="../images/clear.gif" width="35" border="0" name="redStar"/>
								</td></tr>
							</tbody></table>
						</td></tr>
					</tbody></table>
			</testCode>
      	<exResults>
				<list>
					<item>A red star appears in the box when the input button label receives focus.</item>
					<item>The red star disappears when the input button label loses focus.</item>
				</list>
			</exResults>
			<sourcescript>
				function focusTest (img) 
				{
   				document.redStar.src = img
				}

				function blurTest (img) 
				{
      			document.redStar.src = img
				}
			</sourcescript>
		</test>
						
	</content>

</testsuite>