[contents]

W3C

HTML Techniques for WCAG 2.0

W3C Working Draft 23 November 2005

This version:
http://www.w3.org/TR/2005/WD-WCAG20-HTML-TECHS-20051123/
Latest version:
http://www.w3.org/TR/WCAG20-HTML-TECHS/
Previous version:
http://www.w3.org/TR/2005/WD-WCAG20-HTML-TECHS-20050630/
Editor:
Michael Cooper, Watchfire

Abstract

This document provides information to Web content developers who wish to satisfy the success criteria of "Web Content Accessibility Guidelines 2.0" [WCAG20] (currently a W3C Working Draft). The techniques in this document are specific to Hypertext Markup Language content [HTML4], [XHTML1] although some techniques contain Cascading Style Sheet [CSS1] and ECMAScript solutions. Use of the illustrative techniques provided in this document may make it more likely for Web content to demonstrate conformance to WCAG 2.0 success criteria (by passing the relevant tests in the WCAG 2.0 test suite - to be developed) than if these illustrative techniques are not used.

There may be other techniques besides those provided in this document that may be used to demonstrate conformance to WCAG 2.0; in that case, it is encouraged to submit those techniques to the WCAG WG for consideration for inclusion in this document, so that the set of techniques maintained by the WCAG WG is as comprehensive as possible. Deprecated examples illustrate techniques that the Working Group no longer recommends, but may be applicable in some cases.

This document is part of a series of documents published by the W3C Web Accessibility Initiative (WAI) to support WCAG 2.0.

Status of this Document

This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.

This version of HTML techniques has not significantly changed since the 19 November 2004 Working Draft. The Web Content Accessibility Guidelines Working Group (WCAG WG) has focused on addressing issues related to Guidelines and Success Criteria. This publication demonstrates how the different documents may link to each other. As the focus of the WCAG WG returns to techniques and test suites, the structure and presentation of the techniques documents will likely change to reflect the relationships between Guidelines, Techniques, and testing documents. In future revisions, we expect to distinguish between techniques required for conformance versus those that are optional. Please refer to Issue tracking for WCAG 2.0 Techniques for HTML/XHTML for a list of open issues related to this Working Draft. The History of Changes to HTML Techniques for WCAG 2.0 Working Drafts is also available.

Please send comments about this document to public-comments-wcag20@w3.org. The archives for the public comments list are publicly available. Archives of the WCAG WG mailing list are also publicly available.

Publication as a Working Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress. The WCAG WG intends to publish this as a Working Group Note at the time that WCAG 2.0 becomes a Recommendation.

This document has been produced as part of the W3C Web Accessibility Initiative (WAI). The goals of the WCAG WG are discussed in the Working Group charter. The WCAG WG is part of the WAI Technical Activity.


Table of Contents


Introduction

This is the HTML Techniques for Web Content Accessibility Guidelines 2.0 (WCAG 2.0). The guidelines provide a generic description of the requirements for a Web site that is accessible to people with disabilities. The HTML techniques provide an interpretation of the guidelines as applied to HTML and XHTML. This interpretation represents the best thinking of the Web Content Accessibility Guidelines working group and as such is a good guide to achieve conformance to WCAG 2.0. The Working Group encourages authors to implement these techniques where appropriate. Additionally the Working Group strongly encourages manufacturers of authoring tools to support the process of authoring content that conforms to these techniques, and encourages manufacturers or user agents, including assistive technologies, to implement the behaviors described by these techniques. However, these techniques do not provide a final definition of WCAG conformance and it is possible to meet guideline requirements without following these techniques. As new methods of conforming to the guidelines come to the attention of the Working Group, these techniques will be updated.

These techniques are intended for use both with HTML 4.01 and with XHTML 1.0/1.1. To encourage migration to newer technologies, examples for techniques are XHTML unless there is a specific reason to present an HTML example. Some references have not yet been updated to point preferentially to XHTML. This will be adjusted in a future draft of this document.

Note: Techniques in this document are known to contain errors. Recommendations will be rendered obsolete by future drafts. The purpose of this document is to receive feedback about the content of the techniques to ensure that future drafts are more accurate and useful. These techniques should not be implemented by people attempting to attain WCAG conformance at this time.

Future Work

User agent support information is not included in this draft. In future drafts, the WCAG WG intends to provide this information to help authors decide which techniques to implement. Providing this information requires extensive user agent and assistive technology testing. The WCAG WG welcomes submissions of test result information that demonstrates user agent or assistive technology support (or lack of support) of existing techniques. Submissions of additional techniques are also welcome.

As work on the technology-specific checklists progresses, we expect to clearly distinguish between techniques required for conformance versus those that are optional. That distinction is not made in this Working Draft. The issue is captured as Issue #772 -"How do we make it clear that there are some techniques that are sufficient and some that are optional?"

Techniques need to identify how they should be applied in various baselines as discussed in the question of baseline. It is proposed that a set of baselines will be described and each technique indicate whether it is sufficient, optional, or not recommended in that baseline.

1. Techniques

These techniques have been provided to demonstrate how techniques should appear in the "How to Meet" documents. Ultimately, each technique will be its own atom, but for now they are collected in this file. The techniques contain the structure that the Working Group is considering, except that test cases are omitted. Only Guideline 1.1 techniques are included because recent structural changes have not yet been applied to the entire collection of techniques.


H45: Using alt attributes on img elements.

Applicability

Documents that load images, when the image format is not in the baseline.

Description

When using the img element, specify a short text alternative with the alt attribute. Note. The value of this attribute is referred to as "alt-text".

Example

The image contains alt text that plays the same function on the page as the image. Note that it does not necessarily describe the visual characteristics of the image itself.

 
<img src="companylogo.gif" alt="Company Name">

Resources

Tests

Available test information for this technique will be inserted here.


H46: Using null alternative text and no title attribute on img elements for spacer or purely decorative images.

Applicability

Documents that load images, when the image format is not in the baseline.

Description

If content developers cannot use style sheets and must use invisible or transparent images (e.g., with IMG) to lay out images on the page, they should use null alt text, alt="". This indicates to assistive technology that the image can be safely ignored.

Example

Do not use &nbsp; or the text "spacer" as the text alternative for images.

my poem requires a big space<IMG src="10pttab.gif" alt="&amp;nbsp;&amp;nbsp;&amp;nbsp;">here
<IMG src="spacer.gif" alt="spacer">
<IMG src="colorfulwheel.gif" alt="The wheel of fortune">
         

Resources

No resources available for this technique.

Tests

Available test information for this technique will be inserted here.


H47: Failure due to using text alternatives that aren't alternatives (e.g. filenames or placeholder text).

Applicability

Documents that load images, when the image format is not in the baseline.

Description

Alternative text is sometimes used to provide textual information that is not an appropriate text alternative of the image. Most often this is used to affect search engine results. This alt text can present major barriers to users of text views of the document.

Resources

No resources available for this technique.

Tests

Available test information for this technique will be inserted here.


H48: Using the body of the object element.

Applicability

Documents that load media with the object element, when the media format is not in the baseline.

Description

When using object, specify a text alternative in the body of the object element.

Editorial Note: There is the possibility that we may either replace this technique or provide a supplementary technique based on what Gez outlines in Object Paranoia.

Example

The image object has content that provides a brief description of the function of the image.

 
<object data="companylogo.gif" type="image/gif">
   Company Name 
</object> 				

Resources

Tests

Available test information for this technique will be inserted here.


H50: Using longdesc.

Applicability

Documents that load images, when the image format is not in the baseline.

Description

When a short text alternative does not suffice to adequately convey the function or role of an image, provide additional information in a file designated by the longdesc attribute.

Example

This example directs users to a file called "2001sales.html" to describe the sales data for 2001.

Here are the contents of 2001sales.html:

In sales97.html:

A chart showing how sales in 1997 progressed. The chart is a bar-chart showing percentage increases in sales by month. Sales in January were up 10% from December 1996, sales in February dropped 3%, ..

 
<img src="97sales.gif" alt="Sales for 1997" longdesc="sales97.html">

Resources

Tests

Available test information for this technique will be inserted here.


H61: Providing text and non-text alternatives for object.

Applicability

Documents that load media with the object element, when the media format is not in the baseline.

Description

If object is used, provide a text alternative in the content of the element:

Example

This example shows a text alternative for a Java applet using the object element.

 
<object classid="java:Press.class" width="500" height="500">
  As temperature increases, the molecules in the balloon...
</object>

Example

This example takes advantage of the fact the object elements may be nested to provide for alternative representations of information.

 
<object classid="java:Press.class" width="500" height="500">
  <object data="Pressure.mpeg" type="video/mpeg">
    <object data="Pressure.gif" type="image/gif">
      As temperature increases, the molecules in the balloon...
    </object>
  </object>
</object>

Resources

Tests

Available test information for this technique will be inserted here.


H62: Using the body of the applet element.

Applicability

Documents that load Java applets, when Java is not in the baseline.

Description

If applet is used, provide a text alternative in the content of the element:

Example

This example shows a text alternative for a Java applet using the applet element.

 
<applet code="Press.class" width="500" height="500">
  As temperature increases, the molecules in the balloon...
</applet>

Resources

No resources available for this technique.

Tests

Available test information for this technique will be inserted here.


H63: Using alt attributes on applet elements.

Applicability

Documents that load Java applets, when Java is not in the baseline.

Description

Use the alt attribute to label an applet.

Example

This example shows a text alternative for a Java applet using the applet element.

 
<applet alt="Balloon inflation example" code="Press.class" width="500" height="500">
</applet>

Resources

No resources available for this technique.

Tests

Available test information for this technique will be inserted here.


H64: Using noembed with embed.

Applicability

Documents that load plugins with the embed element, when the plugin technology is not in the baseline.

Description

Provide alternative content for the embed element in a noembed element. The noembed is rendered only if the embed is not supported. While it can be positioned anywhere on the page, the best location is beside or as a child of embed.

Editorial Note: Is it true that noembed can go either beside or inside embed? Is there a preference?

Example

noembed is provided beside an embed.

   
<embed src="moviename.swf" width="100" height="80"
  pluginspage="http://example.com/shockwave/download/" />
<noembed>
  <img alt="Still from Movie" src="moviename.gif" 
    width="100" height="80" />
</noembed>

Resources

No resources available for this technique.

Tests

Available test information for this technique will be inserted here.


H65: Using alt attributes on embed elements.

Applicability

Documents that load plugins with the embed element, when the plugin technology is not in the baseline.

Description

Provide alternative content for the embed element in the alt attribute.

Example

alt is provided for embed.

 
<embed src="moviename.swf" width="100" height="80"
  pluginspage="http://example.com/shockwave/download/"
  alt="Still from Movie" />

Resources

No resources available for this technique.

Tests

Available test information for this technique will be inserted here.


H72: Providing alternative content for iframe.

Applicability

Documents that load frames.

Description

Provide alternative content for iframe by providing meaningful and accessible content between the start and end tags.

Resources

No resources available for this technique.

Tests

Available test information for this technique will be inserted here.


H73: Not using long descriptions for iframe.

Applicability

Documents that load frames.

Description

While HTML permits longdesc, it isn't meaningful to provide today since user agents capable of displaying the longdesc are also capable of providing access to the iframe content itself.

Resources

No resources available for this technique.

Tests

Available test information for this technique will be inserted here.


H93: Writing for browser that do not support frame.

Applicability

Documents that load frames.

Description

Provide meaningful content in the noframes element. noframes follows the frameset and contains a body element.

Meaningful content can include a version of the entire content of the frames in the frameset, or it can consist of instructions and links for users to find the content. Often the links point to the frame documents, outside their frames context. noframes content must not consist of instructions for users to switch to a frames-capable browser.

Example

In this example, the user will receive a link to table_of_contents.html, which would allow him or her to navigate through the site without using frames.

 

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>This is top.html</title>
  </head>
  <frameset cols="50%, 50%" title="Our big document">
    <frame src="main.html" title="Where the content is displayed" />
    <frame src="table_of_contents.html" title="Table of Contents" />
    <noframes>
      <body>
        <a href="table_of_contents.html">Table of
        Contents.</a> 
        <!-- other navigational links that are available in main.html
                  are available here also. -->
      </body>
    </noframes>
  </frameset>
</html>

Resources

Tests

Available test information for this technique will be inserted here.


2. References

ASTER
For information about ASTER, an "Audio System For Technical Readings", consult T. V. Raman's home page .
CSS1
"Cascading Style Sheets, level 1," B. Bos, H. Wium Lie, eds., W3C Recommendation 17 Dec 1996, revised 11 Jan 1999. Available at http://www.w3.org/TR/REC-CSS1.
CSS2
"Cascading Style Sheets, level 2," B. Bos, H. Wium Lie, C. Lilley, and I. Jacobs, eds., W3C Recommendation 12 May 1998. Available at http://www.w3.org/TR/REC-CSS2/.
HTML4
"HTML 4.01 Specification," D. Raggett, A. Le Hors, I. Jacobs, eds., W3C Recommendation 24 December 1999. Available at http://www.w3.org/TR/html401/
IBMJAVA
IBM Guidelines for Writing Accessible Applications Using 100% Pure Java are available from IBM Special Needs Systems.
JAVAACCESS
Information about Java Accessibility and Usability is available from the Trace Research and Development Center.
MACROMEDIA
Flash OBJECT and EMBED Tag Syntax from Macromedia.
MATHML
"Mathematical Markup Language 1.0", P. Ion and R. Miner, eds., W3C Recommendation 7 April 1998, revised 7 July 1999. Available at http://www.w3.org/TR/REC-MathML.
TRACE
The Trace Research and Development Center . Consult this site for a variety of information about accessibility, including a scrolling Java applet that may be frozen by the user .
WAI-ER
The Evaluation and Repair Tools Working Group
WCAG10-CSS-TECHNIQUES
"CSS Techniques for Web Content Accessibility Guidelines 1.0," W. Chisholm, G. Vanderheiden, and I. Jacobs, eds. W3C Note 6 November 2000. Available at: http://www.w3.org/TR/WCAG10-CSS-TECHS/.
WCAG20
"Web Content Accessibility Guidelines 2.0," B. Caldwell, W. Chisholm, J. White, and G. Vanderheiden, eds., W3C Working Draft 23 November 2005. This W3C Working Draft is available at http://www.w3.org/TR/2005/WD-WCAG20-20051123/. The latest version of WCAG 2.0 is available at http://www.w3.org/TR/WCAG20/
XHTML1
"XHTML 1.0 The Extensible HyperText Markup Language (Second Edition)," S. Pemberton, et al., W3C Recommendation 26 January 2000, revised 1 August 2002. Available at: http://www.w3.org/TR/xhtml1/.