Techniques for WCAG 2.0

Skip to Content (Press Enter)

-

FLASH4: Providing submit buttons in Flash

Applicability

This technique relates to:

User Agent and Assistive Technology Support Notes

See User Agent Support for Flash for general information on user agent support.

Description

The objective of this technique is to use submit buttons to allow users to take actions that cause changes of context rather than allowing changes in context to occur when the value or state of a non-submit button control is modified. The intended use of a submit button in this technique is to generate an HTTP request that submits data entered in a form or to perform an action that triggers a change in context, so it is an appropriate control to use to initiate this change.

Examples

Example 1: ActionScript 3 combobox with submit button

This is a basic ActionScript 3 example of a combobox component with a submit button to redirect the user to a different resource.

Example Code:

import fl.accessibility.ComboBoxAccImpl;
import flash.net.navigateToURL;
import flash.net.URLRequest;
ComboBoxAccImpl.enableAccessibility();
state_submit.addEventListener(MouseEvent.CLICK, submitHandler);
function submitHandler(e) {
  var url: URLRequest = new URLRequest("http://www.wikipedia.org/wiki/" + 
    state_combo.selectedLabel);
  navigateToURL(url, "_self");
}

Example 2: ActionScript 2 combobox with submit button

This is a basic ActionScript 2 example of a combobox component with a submit button to redirect the user to a different resource - the same example as in example 1 except in ActionScript 2:

Example Code:

import fl.accessibility.ComboBoxAccImpl;
ComboBoxAccImpl.enableAccessibility();
state_submit.addEventListener("click", submitHandler);
function submitHandler(e) {
  getURL("http://www.wikipedia.org/wiki/" + state_combo.selectedLabel, "_self");
}

Tests

Procedure

  1. Find all interactive control instances (that are not submit buttons) in the flash movie that can initiate a change of context, e.g. a combobox, radio button or checkbox.

  2. For each instance, confirm that the event handler(s) responsible for the change of context are not associated with the controls themselves, but with a separate button instead.

Expected Results

#2 is true

If this is a sufficient technique for a success criterion, failing this test procedure does not necessarily mean that the success criterion has not been satisfied in some other way, only that this technique has not been successfully implemented and can not be used to claim conformance.