W3CWeb Accessibility Initiative Home

accesskey attribute for button element

On this page: Test 1 | Test 2 | Test 3 | References | About these tests

Nearby: More HTML 4.01 Tests | UAAG 1.0 Test Suite

UAAG 1.0 Requirement

Checkpoint 1.1 Full keyboard access (Priority 1 )
Provision 1 : Ensure that the user can operate, through keyboard input alone, any user agent functionality available through the user interface.

Test 1 : button element, type="submit"

Procedure

  1. Using the standard keyboard or an assistive technology that emulates the keyboard, activate the submit button using Acceskey "S".

Run test

Expected results

  1. The keyboard or assistive technology that emulates the keyboard moves focus to the "Submit" button.
  2. The keyboard or assistive technology that emulates the keyboard activates the "Submit" button.

Source code

<form action="../action/return.html" method="get" enctype="application/x-www-form-urlencoded">
  <label for="submit">Submit Button (Accesskey "S"): </label>
  <button id="submit" accesskey="S" name="submit" type="submit" value="submit">Submit</button>
</form>

Test 2 : button element, type="reset"

Procedure

  1. Using the standard keyboard or an assistive technology that emulates the keyboard, activate the "Reset" button using accesskey "R".
  2. (To make sure initial values have been restored, activate the textarea using accesskey "T" and alter "Initial value".)

Run test


Expected results

  1. 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".

Source code

<form action="../action/return.html" method="post" enctype="application/x-www-form-urlencoded">
  <label for="textarea">Default Textarea (Accesskey "T"): </label>
  <textarea id="textarea" accesskey="T" name="textarea" rows="1" cols="14">Initial Value</textarea>
  <br clear="none"></br>
  <label for="reset">Reset Button (Accesskey "R"): </label>
  <button id="reset" accesskey="R" name="reset" type="reset" value="reset">Reset</button>
</form>

Test 3 : button element, type="button"

Procedure

  1. Using the standard keyboard or an assistive technology that emulates the keyboard, activate the "Test Button" using accesskey "B".

Run test

Expected results

  1. The standard keyboard or an assistive technology that emulates the keyboard activates "Test Button" and its associated function using accesskey "B".

Source code

<form action="../action/return.html" method="post" enctype="application/x-www-form-urlencoded">
  <label for="test-button">Test Button (Accesskey "B"): </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>

References

  1. HTML 4.01 specification for ACCESSKEY
  2. HTML 4.01 specification for BUTTON

About this test suite

This test is part of a test suite for the User Agent Accessibility Guidelines (UAAG) 1.0 . This work is conducted by the User Agent Accessibility Guidelines Working Group , which is part of W3C's Web Accessibility Initiative (WAI) . Please send comments on this test to w3c-wai-ua@w3.org ( public archive ).


Test created by:

Last modified: $Date: 2003/04/02 23:46:27 $ by $Author: jongund $