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

    <shortTitle>accesskey attribute on button element</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>

    <creator>Colin Koteles</creator>

    <metaElement>
    </metaElement>

    <testStyle>
    </testStyle>
  </metaInfo>

  <requirementInfo>
    <checkpoints>
      <checkpoint xref="tech-device-independent-ui">
        <provisions>
          <provision xref="tech-device-independent-ui-1" />
        </provisions>
      </checkpoint>
    </checkpoints>
  </requirementInfo>

  <content>
    <test>
      <testDesc>button element, type="submit"</testDesc>
      <procedure>
        <list>
          <item>Using the standard keyboard or an assistive
          technology that emulates the keyboard, activate the
          submit button using Acceskey "S".</item>
        </list>
      </procedure>

      <testCode>
        <form action="../action/return.html" method="get">
          <label for="submit">Submit Button (Accesskey
          "S"):&nbsp;</label>

          <button id="submit" accesskey="S" name="submit"
          type="submit" value="submit">Submit</button>
        </form>
      </testCode>

      <exResults>
        <list>
          <item>The keyboard or assistive technology that emulates
          the keyboard moves focus to the "Submit" button.</item>

          <item>The keyboard or assistive technology that emulates
          the keyboard activates the "Submit" button.</item>
        </list>
      </exResults>
    </test>

    <test>
      <testDesc>button element, type="reset"</testDesc>
      <procedure>
        <list>
          <item>Using the standard keyboard or an assistive
          technology that emulates the keyboard, activate the
          "Reset" button using accesskey "R".</item>

          <item>(To make sure initial values have been restored,
          activate the textarea using accesskey "T" and alter
          "Initial value".)</item>
        </list>
      </procedure>

      <testCode>
        <form action="../action/return.html" method="post">
          <label for="textarea">Default Textarea (Accesskey
          "T"):&nbsp;</label>

          <textarea id="textarea" accesskey="T" name="textarea"
          rows="1" cols="14">Initial Value</textarea>

          <br />

          <label for="reset">Reset Button (Accesskey
          "R"):&nbsp;</label>

          <button id="reset" accesskey="R" name="reset"
          type="reset" value="reset">Reset</button>
        </form>
      </testCode>

      <exResults>
        <list>
          <item>The standard keyboard or an assistive technology
          that emulates the keyboard activates the "Reset" button
          and restores the TEXTAREA to "Initial Value" using
          accesskey "R".</item>
        </list>
      </exResults>
    </test>

    <test>
      <testDesc>button element, type="button"</testDesc>
      <procedure>
        <list>
          <item>Using the standard keyboard or an assistive
          technology that emulates the keyboard, activate the "Test
          Button" using accesskey "B".</item>
        </list>
      </procedure>

      <testCode>
        <form action="../action/return.html" method="post">
          <label for="test-button">Test Button (Accesskey
          "B"):&nbsp;</label>

          <button id="test-button" accesskey="B"
          onclick='document.write("Test was successful. Click back on your browser to return to the test suite.")'
           type="button" value="test">Test Button</button>
        </form>
      </testCode>

      <exResults>
        <list>
          <item>The standard keyboard or an assistive technology
          that emulates the keyboard activates "Test Button" and
          its associated function using accesskey "B".</item>
        </list>
      </exResults>
    </test>
  </content>
</testsuite>

