Guide to 3.2 Level 2 Success Criterion 2

Key terms and important concepts

change of context

A change of user agent, viewport, user interface controls, or focus; or complete change of content.

focus

The component that is currently selected.

receives focus

The instant that a component has focus.

event handler

A function associated with a component that is executed in response to an event, such as focus, change, etc.

Intent of this success criterion

The intent of this success criterion is to ensure that functionality is predictable as visitors navigate their way through a document. Any component that is able to fire an event when it receives focus must not change the context. Examples of changing context when a component receives focus include, but are not limited to:

Techniques for addressing 3.2 L2 SC2

Ensure that behaviour is implemented in a manner that is predictable by the user. For example, forms should only be submitted at the explicit request of the user, such as activating a submit button.

If a new document is required, add a link so that the document is loaded at the user's request.

Do not interfere with user-interface cues, such as a dotted border around the active component in a visual user agent. A technique used by some developers to remove the dotted border of the active component has the unfortunate effect of completely disabling keyboard navigation.

Technology Specific Example of Disabling Keyboard Navigation

The following is an example of a bad technique used by some HTML authors to remove the dotted border that indicates a component has focus from the active link in visual user agents.

<a href="link.html" onfocus="if(this.blur)this.blur();">Link Phrase</a>

Optional Techniques (advisory) for 3.2 L2 SC2

Editorial Note: As this success criterion is negative, are there any optional techniques that would be relevant?.

Benefits: How 3.2 L2 SC2 helps people with disabilities

  • People who navigate with a keyboard, including people with visual impairments that may use assistive technologies and people with mobility problems whose motor control makes using a pointing device difficult, may activate a change of context without having an opportunity to make appropriate choices.

  • People with cognitive difficulties may be unaware that an implicit action has caused a change of context.

Examples of 3.2 L2 SC2

All of the following techniques violate guideline 3.2 level 2 success criterion 2.

  1. A form control that automatically submits the form when it receives focus
  2. Adding/removing/changing form controls when a component receives focus
  3. Adding/removing/changing content when a component receives focus
  4. Any component that automatically launches a new window when it receives focus
  5. Changing the focus when a component receives focus

Related resources

Editorial Note: What related resources are available for this success criterion?.