<?xml version="1.0"?>
<!DOCTYPE testsuite SYSTEM "http://www.w3.org/WAI/UA/TS/dtd/uaag-testsuite-2.dtd">
<testsuite id="ts1102-accesskey-forms">
  <metaInfo>
    <testTitle>ACCESSKEY attribute for FORM elements</testTitle>

    <shortTitle>ACCESSKEY attribute for FORM elements</shortTitle>

    <testElement>
      <elementName>ACCESSKEY</elementName>
		<hlink href="http://www.w3.org/TR/html401/interact/forms.html#adef-accesskey">&hspec; ACCESSKEY</hlink>
    </testElement>	

	 <testElement>
      <elementName>BUTTON</elementName>
      <hlink href="http://www.w3.org/TR/html401/interact/forms.html#edef-BUTTON">&hspec; BUTTON</hlink>
    </testElement>

	 <testElement>
		<elementName>CHECKBOX</elementName>
		<hlink href="http://www.w3.org/TR/html401/interact/forms.html#checkbox">&hspec; CHECKBOX</hlink>
	 </testElement>

	 <testElement>
		<elementName>INPUT</elementName>
		<hlink href="http://www.w3.org/TR/html401/interact/forms.html#edef-INPUT">&hspec; INPUT</hlink>
	 </testElement>

    <testElement>
      <elementName>LABEL</elementName>
		<hlink href="http://www.w3.org/TR/html401/interact/forms.html#h-17.9.1">&hspec; LABEL</hlink>
    </testElement>
	 
	 <testElement>
      <elementName>LEGEND</elementName>
		<hlink href="http://www.w3.org/TR/html401/interact/forms.html#h-17.10">&hspec; LEGEND</hlink>
    </testElement>
	 
	 <testElement>
		<elementName>RADIO</elementName>
		<hlink href="http://www.w3.org/TR/html401/interact/forms.html#radio">&hspec; RADIO buttons</hlink>
	 </testElement>
	 
	 <testElement>
		<elementName>TEXTAREA</elementName>
		<hlink href="http://www.w3.org/TR/html4/interact/forms.html#edef-TEXTAREA">&hspec; TEXTAREA</hlink>
	 </testElement>	 	 	  

    <creator>Colin Koteles</creator>

    <metaElement>
    </metaElement>

    <testStyle>
    </testStyle>
  </metaInfo>

  <requirementInfo>
    <checkpoints>
      <checkpoint xref="tech-info-current-author-config">
        <provisions>
          <provision xref="tech-info-current-author-config-1"/>
        </provisions>
      </checkpoint>
    </checkpoints>
  </requirementInfo>

  <content>
    <test>
      <testDesc>accesskey attribute for form elements</testDesc>
      <procedure>
        <list>
          <item>Configure the user agent to provide a centralized view of the keyboard bindings specified by the author through the accesskey attribute of the various form elements.</item>
        </list>
      </procedure>

      <testCode>
        	<h4>Test form 1</h4>
  				<form action="../action/return.html" method="post" title="Test Form 1" enctype="application/x-www-form-urlencoded">
					<fieldset>
						<legend accesskey="1">Form fieldset 1 (accesskey "1")</legend>
						<label>Test text input 1 (fieldset 1, accesskey "a"): <input type="text" name="text1" accesskey="a"/></label><br/>
						<label>Test text input 2 (fieldset 1, accesskey "b"): <input type="text" name="text2" accesskey="b"/></label><br/>
						<label>Test textarea 1 (fieldset 1, accesskey "c"):  <textarea rows="4" cols="20" name="textarea1" accesskey="c"></textarea></label>	
					</fieldset>
					<fieldset>
						<legend accesskey="2">Form fieldset 2 (accesskey "2")</legend>
						<label>Test text input 3 (fieldset 2, accesskey "d"): <input type="text" name="text3" accesskey="d"/></label><br/>
						<label>Test text input 4 (fieldset 2, accesskey "e"): <input type="text" name="text4" accesskey="e"/></label><br/>
						<label>Test textarea 2 (fieldset 2, accesskey "f"):  <textarea rows="4" cols="20" name="textarea2" accesskey="f"></textarea></label>							
					</fieldset>
					<fieldset>
						<legend accesskey="3">Form fieldset 3 (accesskey "3")</legend>
						<label for="reset">Reset button (accesskey "r"): </label>
						<button id="reset" accesskey="r" name="reset" type="reset" value="reset">Reset</button>
						<label for="submit">Submit button (accesskey "s"): </label>
						<button id="submit" accesskey="s" name="submit" type="submit" value="submit">Submit</button>	
					</fieldset>
				</form>
	  			<h4>Test form 2</h4>
	  			<form action="../action/return.html" method="post" title="Test Form 2" enctype="application/x-www-form-urlencoded">
					<fieldset>
						<legend accesskey="4">Form fieldset 4 (accesskey "4")</legend>
						<label for="checkbox1">Checkbox 1 (accesskey "g")</label>
						<input id="checkbox1" accesskey="g" type="checkbox" checked="checked" value="1" name="check-input"/>
						<br/>
						<label for="checkbox2">Checkbox 2 (accesskey "h")</label>
						<input id="checkbox2" accesskey="h" type="checkbox" value="2" name="check-input"/>	
					</fieldset>
					<fieldset>
						<legend accesskey="5">Form fieldset 5 (accesskey "5")</legend>
						<label for="button1">Button 1 (accesskey "i")</label>
						<input id="button1" accesskey="i" type="radio" value="1" name="radio-input" checked="checked"/>
						<br/>
						<label for="button2">Button 2 (accesskey "j")</label>
						<input id="button2" accesskey="j" type="radio" value="2" name="radio-input"/>
					</fieldset>
					<fieldset>
						<legend accesskey="3">Form fieldset 6 (accesskey "6")</legend>
						<label for="reset2">Input button (type="reset", accesskey "t"): </label>
						<input id="reset2" accesskey="t" name="reset2" type="reset" value="Reset"/>
						<label for="submit2">Input button (type="submit", accesskey "y"): </label>
						<input id="submit2" accesskey="y" name="submit2" type="submit" value="Submit"/>	
					</fieldset>
				</form>
      </testCode>

      <exResults>
        <list>
          <item>The user agent can provide a centralized view of the author assigned keyboard bindings through the use of the accesskey attribure.
			 	The user should be able to navigate easily back and forth between the viewport with the current focus and the list of bindings. </item>
        </list>
      </exResults>
    </test>
   
  </content>
</testsuite>

