Default font size Increase font size  |   Decrease font size   |  
Skip to main content

Success Criteria 3.2.2 On Input: [Level A]

When a user interacts with a form control there may be presentational changes or a change to the state of the control, for instance a checkbox being ticked or not. There should be no action though which changes the context. A change to the context such as navigating to another can be disorienting to users who are not expecting it. These context changes are best served by using the correct controls, links and buttons.

Techniques

Providing submit buttons

A submit button normally generates an HTTP request which submits form data to the server. This is a change of context but the submit button is the appropriate control by which to do this.

<form action="register.php" action="post"> 
    <fieldset>
        <legend>Registration Details</legend>
        <label  for="name">Name (required):</label>
        <input id="name" type="text" />
        <br />
        <label  for="address">Address:</label>
        <input id="address" type="text" />
        <br />
        <label for="postcode2">Postcode:</label>
        <input id="postcode2" type="text" />
        <br />
        <label  for="email">Email (required):</label>
        <input id="email" type="text" />
    </fieldset>
    <button name="submit">Register</button>
</form>
Registration Details



Using a button with a select element

Any action to be performed when a value from a dropdown list is selected should be under the control of the user. A selection may cause automatic submission of a form, the display of a pop-up window or navigation elsewhere. These actions can be prevented from happening automatically by the provision of a button which is under the user's control.

In the following example selection of a team actually changes the button text thus allowing the user to make an informed decision as to whether they wish to view that team or not. Without a button, the team could be displayed automatically without the user realising that they had actually picked the wrong team.

Select team from dropdown list (Team selected will be displayed in the button text):

    

Describing what will happen before a change of context is made by a form control

If a form control such as radio button or checkbox is going to be used to change context, there should be a description of what is going to happen prior to the control.

Ticking the following checkbox will result in this screen disappearing down a black hole.

Using script events to change controls without change of context

Script events such as 'onchange' are typically used to make changes to form controls without changing the context. For example, selecting a value from one dropdown list changes the content in a subsequent dropdown list to values which are associated with this selection.

     

Failures

Automatically submitting a form when the last field in the form is completed

This criterion fails when a form is automatically submitted after the last field is completed. This may be a text field which causes a submit when fully completed or when focus is lost. It could also be a dropdown list which automatically submits the form once a value has been selected.

The following example demonstrates what might happen when an item is selected from a dropdown list and automatically submits the form changing the context.

Select your required power option:

A new window is automatically opened when a control's status is changed

If a radio button, checkbox or select list is clicked, ticked or selected from its status changes. If this status change automatically opens another window then that is a failure for the criterion.

  

This failure could perhaps be mitigated by a description of what is expected to happen when a control is interacted with.

Top