W3CWeb Accessibility Initiative Home

ONCHANGE attribute for INPUT elements

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

Nearby: More HTML 4.01 Tests | UAAG 1.0 Test Suite

UAAG 1.0 Requirement

Checkpoint 1.2 Activate event handlers (Priority 1 )
Provision 1 : Allow the user to activate, through keyboard input alone, all input device event handlers that are explicitly associated with the element designated by the content focus.

Test 1 :


  1. Using the keyboard or an assistive technology that emulates the keyboard, move focus to the input control and alter the input control's value.
  2. Using the keyboard or an assistive technology that emulates the keyboard, move focus off the input control to trigger the onChange event.

Run test

Expected results

  1. When the onChange event is triggered, the "Echoed Value" input box displays the same value as the "Original Value" input box.

Source code

<form action="../action/return.html" method="post" id="origForm" enctype="application/x-www-form-urlencoded">
  <label for="orig">Original Value: </label>
  <input id="orig" onchange="changeTest(this.form)" name="orig" type="text"></input>
  <br clear="none"></br>
  <label for="echo">Echoed Value: </label>
  <input id="echo" type="text"></input>

Test Script Code

function changeTest ( form ) { form.echo.value = form.orig.value }


  1. HTML 4.01 specification for ONCHANGE
  2. HTML 4.01 specification for INPUT

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