W3CWeb Accessibility Initiative Home

ONCHANGE attribute for TEXTAREA 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 text area and alter the original text area value.
  2. Using the keyboard or an assistive technology that emulates the keyboard, move focus off the text area to trigger the onChange event.

Run test

Expected results

  1. The "Echoed Value" text area takes on the same value as the "Original Value" text area when the onChange event is triggered.

Source code

<form action="../action/return.html" method="get" enctype="application/x-www-form-urlencoded">
  <label for="origText">Original Value:</label>
  <textarea id="origText" name="origText" rows="1" cols="20" onchange="changeTest(this.form)">Original Value</textarea>
  <br clear="none"></br>
  <label for="echoText">Echoed Value:</label>
  <textarea id="echoText" name="echoText" rows="1" cols="20"></textarea>

Test Script Code

function changeTest ( form ) { form.echoText.value = form.origText.value; }


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

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 $