Techniques for WCAG 2.0

On this page:

-

# H35: Providing text alternatives on `applet` elements

## Applicability

HTML and XHTML Documents that load Java applets where `applet` is not deprecated.

This technique relates to:

- Success Criterion 1.1.1 (Non-text Content)
  - How to Meet 1.1.1 (Non-text Content)
  - Understanding Success Criterion 1.1.1 (Non-text Content)

## User Agent and Assistive Technology Support Notes

- This technique is not supported well by assistive technologies. The HTML specification explains that text alternatives for applets are to be displayed when the element cannot be rendered. Therefore, text alternatives that are included in the body of `applet` elements may not be available to users unless the user agent either does not support or has been configured not to render applets.

- IE 6 for Windows and Firefox 1.5 and Opera 9 on Windows treat alternative text for the applet element differently. IE will display the body text of the applet element and not the alt attribute. Firefox and Opera will display the alt attribute but not the body text.

## Description

Provide a text alternative for an applet by using the alt attribute to label an applet and providing the text alternative in the body of the applet element. In this technique, both mechanisms are required due to the varying support of the alt attribute and applet body text by user agents.

## Examples

### Example 1: An applet to play the tic-tac-toe game.

Example Code:

    <applet code="tictactoe.class" width="250" height="250" alt="tic-tac-toe game">
       tic-tac-toe game
    </applet>

## Related Techniques

- G94: Providing short text alternative for non-text content that serves the same purpose and presents the same information as the non-text content

## Tests

### Procedure

1. View the source code of the applet element

2. Check that the applet element contains an alt attribute with a text alternative for the applet

3. Check that the applet element contains a text alternative for the applet in the body of the applet element

### Expected Results

- Checks #2 and #3 are true.

- Top
- Contents
- Intro
- Previous: Technique H34
- Next: Technique H36