Techniques for WCAG 2.0

Skip to Content (Press Enter)

-

H83: Using the target attribute to open a new window on user request and indicating this in link text

Important Information about Techniques

See Understanding Techniques for WCAG Success Criteria for important information about the usage of these informative techniques and how they relate to the normative WCAG 2.0 success criteria. The Applicability section explains the scope of the technique, and the presence of techniques for a specific technology does not imply that the technology can be used in all situations to create content that meets WCAG 2.0.

Applicability

HTML 4.01 Transitional and XHTML 1.0 Transitional

This technique relates to:

Description

The objective of this technique is to avoid confusion that may be caused by the appearance of new windows that were not requested by the user. Suddenly opening new windows can disorientate or be missed completely by some users. In HTML 4.01 Transitional and XHTML 1.0 Transitional, the target attribute can be used to open a new window, instead of automatic pop-ups. (The target attribute is deleted from HTML 4.01 Strict and XHTML 1.0 Strict.) Note that not using the target allows the user to decide whether a new window should be opened or not. Use of the target attribute provides an unambiguously machine-readable indication that a new window will open. User agents can inform the user, and can also be configured not to open the new window. For those not using assistive technology, the indication would also be available from the link text.

Examples

Example 1

The following example illustrates the use of the target attribute in a link that indicates it will open in a new window.

Example Code:

<a href="help.html" target="_blank">Show Help (opens new window)</a>

Tests

Procedure

  1. Activate each link in the document to check if it opens a new window.

  2. For each link that opens a new window, check that it uses the target attribute.

  3. Check that the link text contains information indicating that the link will open in a new window.

Expected Results

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.