W3CWeb Accessibility Initiative Home

Listing Element Event Handlers

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

Nearby: More HTML 4.01 Tests | UAAG 1.0 Test Suite

UAAG 1.0 Requirement

Checkpoint 9.6 Show event handlers (Priority 2 )
Provision 1 : For the element with content focus, make available the list of input device event types for which there are event handlers explicitly associated with the element.

Test 1 :

Procedure

  1. Move focus to the "Test Element" image.
  2. Allow the user to query the "Test Element" image once it has content focus for the list of input device event handlers.
  3. Or, add these event handlers directly to the serial navigation order.

Run test

Test Element

Expected results

  1. The user can query the test element to access a list of available event handlers including: onmouseover, onmouseout, onclick, and ondblclick.
  2. Or, these event handlers are added to the serial navigation order.

Source code

<img src="../images/test_element.gif" name="test_element" alt="Test Element" onmouseover="imgChange1('../images/onmouseover.gif')" onmouseout="imgChange1('../images/onmouseout.gif')" onclick="imgChange1('../images/onclick.gif')" ondblclick="imgChange1('../images/ondblclick.gif')" height="50" width="250" border="0"></img>

Test Script Code

function imgChange1( img ) { document.test_element.src = img; }

Test 2 :

Procedure

  1. Move focus to the "Test Button".
  2. Allow the user to query the "Test Button" once it has content focus for the list of input device event handlers.
  3. Or, add these event handlers directly to the serial navigation order.

Run test

Blank Test Image

Expected results

  1. The user can query the test element to access a list of available event handlers including: onfocus and onblur.
  2. Or, these event handlers are added to the serial navigation order.

Source code

<table summary="layout table">
  <tbody>
    <tr>
      <td rowspan="1" colspan="1">
        <form action="../action/return.html" method="get" enctype="application/x-www-form-urlencoded">
          <button onblur="blurTest('../images/onblur.gif')" onfocus="focusTest('../images/onfocus.gif')" type="submit">Test Button</button>
        </form>
      </td>
      <td rowspan="1" colspan="1">
        <table border="1">
          <tbody>
            <tr>
              <td rowspan="1" colspan="1">
                <img id="test_element2" src="../images/clear.gif" width="165" height="50" alt="Blank Test Image" border="0" name="test_element2"></img>
              </td>
            </tr>
          </tbody>
        </table>
      </td>
    </tr>
  </tbody>
</table>

Test Script Code

function focusTest (img) { document.test_element2.src = img; } function blurTest (img) { document.test_element2.src = img; }

References

  1. HTML 4.01 specification for Intrinsic Events

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:47 $ by $Author: jongund $