W3Cwai-gl-techniques-19980825

Techniques for "WAI Guidelines: Page Authoring"

W3C Working Draft -25 August 1998

This version:
http://www.w3.org/WAI/GL/wai-gl-techniques-19980825
Latest version:
http://www.w3.org/WAI/GL/wai-gl-techniques
Editors:
Gregg Vanderheiden <po@trace.wisc.edu>
Wendy Chisholm <chisholm@trace.wisc.edu>
Ian Jacobs <ij@w3.org>

Copyright  ©  1998 W3C (MIT, INRIA, Keio ), All Rights Reserved.

Abstract

This document is a list of techniques that implement the guidelines described in "WAI Guidelines: Page Authoring". This document includes primarily techniques that HTML authors may use to implement the guidelines, but also refers to some CSS techniques as well.

This document is part of a series of accessibility documents published by the Web Accessibility Initiative.

Status of this document

This is a W3C Working Draft for review by W3C members and other interested parties. It is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to use W3C Working Drafts as reference material or to cite them as other than "work in progress". This is work in progress and does not imply endorsement by, or the consensus of, either W3C or members of the WAI GL Working Group.

This document has been produced as part of the W3C WAI Activity, and is intended as a draft of a Proposed Recommendation for authoring accessible Web pages. The goal of the WAI-GL working group is discussed in our charter.

Comments

Please send detailed comments on this document to w3c-wai-gl@w3.org. Public comments about the WAI author guidelines can  also be sent to this mailing list.

Table of Contents

Rating and Classification
Accessibility Themes for HTML
HTML topics
Acknowledgments
References
Index of Elements and Attributes

Rating and Classification

[PRIORITY 1]
This technique must be implemented by an author, or one or more groups of users will find it impossible to access information in the document. Implementing this technique is a basic requirement for some groups to be able to use WWW documents.
[PRIORITY 2]
This technique should be implemented by an author, or one or more groups of users will find it difficult to access information in the document. Implementing this technique will significantly improve access to WWW documents.
[PRIORITY 3]
This technique should be implemented by an author to make it easier for one or more groups of users to access information in the document. Implementing this technique will improve access to WWW documents.

Accessibility Themes for HTML

The following sections discuss some accessibility issues that arise when one creates HTML documents.

Structure vs. Presentation

Distinguishing the structure of a document from how the content is presented offers a number of advantages, including improved accessibility, manageability, and scalability. The next two sections identify (by theme) precisely those elements and attributes considered structural (and some of their uses) and those that are considered to control presentation. The section on style and style sheets discusses how to use CSS to accomplish the same tasks as the presentation elements and attributes.

Elements and attributes that are deprecated in HTML 4.0 are marked up in this document and followed by an asterisk (*).

Structural elements

Document structure and metadata
Document structure
HTML, HEAD, BODY
Metadata
TITLE, META, ADDRESS
Section headers
H1-H6
Structural elements without predefined formatting
DIV, SPAN
Language information
BDO
Text markup
Paragraphs
P
Emphasis
EM, STRONG
Acronyms and abbreviations
ACRONYM, ABBR
Superscripts and subscripts
SUB, SUP
Insertions and deletions
INS, DEL
Quotations
BLOCKQUOTE, Q
Other markup
DFN, CODE, SAMP, KBD, VAR, CITE
Lists
UL, OL, LI, DL, DT, DD, DIR*, MENU*
Tables
TABLE, CAPTION, THEAD, TFOOT, TBODY, COLGROUP, COL, TR, TH, TD
Links
A, LINK, BASE
Images, image maps, applets, and objects
IMG, OBJECT, PARAM, APPLET*, MAP, AREA
Forms
FORM, INPUT, BUTTON, SELECT, OPTGROUP, OPTION, TEXTAREA, LABEL, FIELDSET, LEGEND, ISINDEX*
Scripts
SCRIPT, NOSCRIPT

Presentation elements

Style sheets
STYLE
Layout, positioning, and alignment
PRE, CENTER*, BR
Text style
TT, I, B, BIG, SMALL, STRIKE*, S*, U*
Fonts
FONT*, BASEFONT*
Rules and borders
HR
Frames
FRAMESET, FRAME, IFRAME, NOFRAMES

Structural attributes

Note. Not all attributes are listed in this section. Only those deemed pertinent to accessibility have been listed.

Document structure and metadata
Alternate text and long descriptions
alt, title, longdesc
Keyboard access
tabindex, accesskey
Class information and unique identifiers
class, id
Media identification
media
Language information
lang, hreflang, dir
Text markup
Insertions and deletions
cite, datetime
Quotations
cite
Lists
start*, value*
Tables
abbr, axis, headers, scope, rowspan, span, summary
Links
href, rel, rev
Images, image maps, applets, and objects
shape, ismap, coords
Forms
for, label

Presentation attributes

Backgrounds and foregrounds
background*, bgcolor*, color*, text*
Link colors
link*, alink*, vlink*
Fonts
face*, size*
Dimensions
height, width. Both attributes may be deprecated, depending on the element with which they are used.
Text formatting
clear*, nowrap*
Layout, positioning, and alignment
align*, valign*, char, charoff
Rules and borders
border, noshade*, rules, size (deprecated according to element).
Spacing
Objects, images, applets
hspace*, vspace*
Table cells
cellpadding, cellspacing
Lists
compact*, type*
Frames
target, marginheight, marginwidth, frame, frameborder, noresize, rows, cols, scrolling

Alternative text and long descriptions

Text is almost always accessible as it may be spoken by screen readers, presented by non-visual browsers and braille readers, etc. HTML 4.0 allows authors to provide text descriptions of visual or audio content in a number of ways:

Alternate text (Alt-text)
Alternate text represents the function of the content. Alternate text is not a description of the visual (or audio) qualities of the content. For example, if an image of a magnifying glass is used for a search button, the alt-text would be "Search" rather than "Magnifying glass". A good test to determine if alternative text is useful is to imagine reading the document aloud over the telephone. What would you say upon encountering this image to make the page comprehensible to the listener?
Brief descriptions
Sometimes, a brief inline description of content (of a sound, an abbreviation, an image) may complement alt-text.
Long descriptions
A long description is a description of the visual or audio qualities of content. Long descriptions are generally stored in external documents (but may be inline if necessary).

Here is a summary of attributes used for alt-text and long descriptions and the elements they apply to (by version of HTML):

To implement alt-text, use the "alt" attribute.
In HTML 4.0, applies to: IMG, AREA, INPUT, APPLET. The attribute is mandatory for the IMG and AREA elements. For other elements, use the "title" attribute.
In HTML 3.2, applies to: IMG, AREA, APPLET.
In HTML 2.0, applies to: N/A.
To implement brief descriptions, use the "title" attribute
In HTML 4.0, applies to almost every element
In HTML 3.2, applies to: LINK, A
In HTML 2.0, applies to: N/A
To implement long descriptions, use the "longdesc" attribute
In HTML 4.0, applies to almost every element
In HTML 3.2, applies to: N/A.
In HTML 2.0, applies to: N/A.

Not every user agent supports these attributes. When required to design documents for a version of HTML known not to support one of these attributes, authors should implement alt-text or descriptions in other ways. Methods include:

Each of the HTML topics below describes prioritized scenarios for alt-text and descriptions.

Some image formats allow internal text in the data file along with the image information. If an image format supports such text (e.g., PNG) authors may also supply brief descriptions there as well.

Alternate pages

In cases where it is not possible to make part of a page accessible, you must allow users to navigate to a separate page that is accessible and that is maintained with the same frequency as the "main" page. There are several techniques for linking to an accessible alternate page:

  1. Provide a link at the top of each page to allow a user to move back and forth between the graphic and alternative versions of the page.
  2. Once a majority of users use browsers that support the LINK element, provide the appropriate information in the header of the principal page (with the LINK element) so that the browser loads it automatically. If the user has set their default media type to "aural," "braille," or "tty" the user agent should load the alternative page automatically.

    Example.

            <HEAD>
            <TITLE>Welcome to the Virtual Mall!</TITLE>
            <LINK title="Text-only version"
                  rel="alternate"
                  href="text_only.html"
                  media="aural, braille, tty">
            </HEAD>
            

Keyboard access

Authors should always ensure that users may interact with a page with devices other than a pointing device (mouse). HTML includes two techniques for specifying keyboard access to form controls and links:

Keyboard shortcuts
Keyboard shortcuts allow users to combine keystrokes to navigate links or form controls on a page.
Tabbing order
Tabbing order describes a (logical) order for navigating from link to link or form control to form control (usually by pressing the "tab" key, hence the name).

Here is a summary of attributes used for keyboard access and long descriptions and the elements they apply to (by version of HTML):

To implement shortcuts, use the "accesskey" attribute.
In HTML, 4.0 applies to: A, AREA, BUTTON, INPUT, LABEL, LEGEND, TEXTAREA
In HTML, 3.2 applies to: N/A.
In HTML, 2.0 applies to: N/A.
To implement tabbing order, use the "tabindex" attribute
In HTML, 4.0 applies to: A, AREA, BUTTON, INPUT, OBJECT, SELECT, TEXTAREA
In HTML, 3.2 applies to: N/A
In HTML, 2.0 applies to: N/A

In the following example, if the accesskey is activated, "doc.html" is retrieved by the browser:

Example.

   <A accesskey="C" href="doc.html" hreflang="en"
      title="XYZ company home page">
         XYZ company home page</A>

The next example assigns "U" as the access key. Typing "U" gives focus to the label, which gives focus to the control, so that the user can input text.

Example.

   <FORM action="submit" method="post">
         <LABEL for="user" accesskey="U">name</LABEL>
         <INPUT type="text" name="user">
   </FORM>

In the next example, we specify a tabbing order among elements (in order, "field1", "field2", "submit"):

Example.

   <INPUT tabindex="1" type="text" name="field1">
   <INPUT tabindex="2" type="text" name="field2">
   <INPUT tabindex="3" type="submit" name="submit">

HTML topics

The following sections document HTML accessibility features and techniques, organized by topic (and mirroring the organization of the HTML 4.0 specification).

Document structure and metadata

Use structural markup wherever possible, and use it as intended by the authors of the HTML 4.0 Recommendation. Structural elements enforce consistency in documents and supply information to other tools (e.g., indexing tools, search engines, programs that extract tables to databases, navigation tools that use header elements, and automatic translation software that translates text from one language into another.

Metadata

Metadata is information about data. This information can provide important orientation information to users. HTML elements that provide useful information about a document include:

Section headers

Since some users skim through a document by navigating its headings, it is important to increment heading levels correctly (H1 followed by H2, rather than H1 followed by H3). Headings should not be used for other purposes (such as formatting text in a larger font size) since this may disorient users; use style sheets for text formatting.

Language information

If you use a number of different languages on a page, make sure that any changes in language are clearly identified by using the "lang" attribute:

Example.

   <P>And with a certain <SPAN lang="fr">je ne sais quoi</SPAN>, 
   she entered both the room, and his life, forever. <Q>My name
   is Natasha,</Q> she said. <Q lang="it">Piacere,</Q>
   he replied in impeccable Italian, locking the door.

Text markup

Emphasis

The proper HTML elements should be used to mark up emphasis: EM and STRONG. While style sheets, elements, and attributes may indicate emphasis to visually enabled users, they may not to other users. The EM and STRONG elements were designed to indicate structural emphasis that may be rendered in a variety of ways (font style changes, speech inflection changes, etc.)

Acronyms and abbreviations

Mark up abbreviations and acronyms with ABBR and ACRONYM and use "title" to indicate the expansion:

Example.

   <Welcome to the <ACRONYM title="World Wide Web">WWW</ACRONYM>!

Quotations

Mark up quotations with the Q (HTML 4.0) and BLOCKQUOTE (HTML 3.2 and HTML 4.0) elements. Do not use them for formatting effects such as indentation.

Lists

Mark up and nest lists correctly.

The HTML list elements DL, UL, and OL (available in HTML 3.2 and HTML 4.0) should only be used to create lists, not for formatting effects such as indentation.

Use style sheets to change list bullets

To change the "bullet" style of unordered list items, use style sheets. This way, if images are not loaded, the browser will draw a default bullet.

Example.

<STYLE ...>
   UL { list-style: url(star.gif) }
</STYLE>
   ...
<UL>
   <LI>Audrey
   <LI>Laurie
   <LI>Alice
</UL>

Avoid using images as bullets in definition lists. However, if this method is used, be sure to provide alt-text for the images.

Deprecated example.

<DL>
   <DD><IMG src="star.gif" alt="Item">Audrey
   <DD><IMG src="star.gif" alt="Item">Laurie
   <DD><IMG src="star.gif" alt="Item">Alice
</DL>

Authors should avoid list styles where bullets provide additional (visual) information. However, if this is done, be sure to provide alt-text describing meaning of the bullet:

Deprecated example.

<DL>
<DD><IMG src="red.gif" alt="New:">Roth IRA</DD>
<DD><IMG src="yellow.gif" alt="Old:">401(k)</DD>
</DL>

Here is a better way to change list bullet styles (using style sheets). To further ensure that users understand differences between list items indicated visually, authors should provide a label before or after the list item phrase:

Example.

<STYLE type="text/css" ...>
   .newtxt { font-weight: bold;
             color: red;
             background-color: yellow }
   .newbullet { list-style : url(yellow.gif) }
</STYLE>
...
<UL>
   <LI class="newbullet">Roth IRA <SPAN class="newtext">New</SPAN>
   <LI 401(k)
</UL>

Tables

Users may make tables more accessible in a number of ways:

Most of the above elements and attributes are only available in HTML 4.0.

This markup will allow accessible browsers and other user agents to restructure tables for non-visual media.

For information about table headers, see the table header algorithm and discussion in the HTML 4.0 Recommendation.

The following example shows how to associate data cells with their corresponding headers by means of the "headers" attribute. The "headers" attribute specifies a list of header cells (row and column labels) associated with the current data cell. This requires each header cell to have an "id" attribute.

Example.
   <TABLE border="border" 
          summary="This table charts the number of
                   cups of coffee consumed by each senator,  
                   the type of coffee (decaf or regular),
                   and whether taken with sugar.">
     <CAPTION>Cups of coffee consumed by each senator</CAPTION>
     <TR>   
         <TH id="t1">Name</TH>
         <TH id="t2">Cups</TH>     
         <TH id="t3" abbr="Type">Type of  Coffee</TH>   
         <TH id="t4">Sugar?</TH>
     <TR>  
         <TD headers="t1">T. Sexton</TD>  
         <TD headers="t2">10</TD>
         <TD headers="t3">Espresso</TD>
         <TD headers="t4">No</TD>  
     <TR>  
         <TD headers="t1">J. Dinnen</TD> 
         <TD headers="t2">5</TD>
         <TD headers="t3">Decaf</TD>
        <TD headers="t4">Yes</TD>
  </TABLE>

A speech synthesizer might render this tables as follows:

  Caption: Cups of coffee consumed by each senator
  Summary: This table charts the number of cups of coffee
           consumed by each senator, the type of coffee
          (decaf or regular), and whether taken with sugar.
  Name: T. Sexton, Cups: 10, Type: Espresso, Sugar: No
  Name: J. Dinnen, Cups: 5, Type: Decaf, Sugar: Yes

The next example associates the same header and data cells as before, but this time uses the "scope" attribute rather than "headers." "Scope" must have one of the following values: row, col, rowgroup or colgroup. Scope specifies the set of data cells to be associated with the current header cell. This method is particularly useful for simple tables. It should be noted that the spoken rendering of this table would be identical to that of the previous example. A choice between the "headers" and "scope" attributes is dependent on the complexity of the table. It does not affect the output so long as the relationships between header and data cells are made clear in the markup.

Example.

   <TABLE border="border" 
          summary="This table charts ...">  
      <CAPTION>Cups of coffee consumed by each senator</CAPTION>
      <TR>  
           <TH scope="col">Name</TH>
           <TH scope="col">Cups</TH>
           <TH scope="col" abbr="Type">Type of Coffee</TH>  
           <TH scope="col">Sugar?</TH>
     <TR>  
           <TD>T. Sexton</TD>  <TD>10</TD>
           <TD>Espresso</TD>   <TD>No</TD>
     <TR>  
           <TD>J. Dinnen</TD>  <TD>5</TD>
           <TD>Decaf</TD>       <TD>Yes</TD>
  </TABLE>

The following example shows how to create categories within a table using the "axis" attribute.

Example.

   <TABLE border="border">
     <CAPTION>Travel Expense Report</CAPTION>
     <TR>  
          <TH></TH>  
          <TH id="a2" axis="expenses">Meals
          <TH id="a3" axis="expenses">Hotels
          <TH id="a4" axis="expenses">Transport
          <TD>subtotals</TD>    
     <TR>  
          <TH id="a6" axis="location">San Jose
          <TH> <TH> <TH> <TD> 
     <TR>  
         <TD id="a7" axis="date">25-Aug-97
         <TD headers="a6 a7 a2">37.74
         <TD headers="a6 a7 a3">112.00
         <TD headers="a6 a7 a4">45.00
         <TD>
     <TR>  
         <TD id="a8" axis="date">26-Aug-97
         <TD headers="a6 a8 a2">27.28
         <TD headers="a6 a8 a3">112.00
         <TD headers="a6 a8 a4">45.00 
         <TD>
     <TR>  
         <TD>subtotals 
         <TD>65.02
         <TD>224.00
         <TD>90.00
         <TD>379.02
     <TR>   
         <TH id="a10" axis="location">Seattle
         <TH> <TH> <TH> <TD>
     <TR>  
         <TD id="a11" axis="date">27-Aug-97
         <TD headers="a10 a11 a2">96.25
         <TD headers="a10 a11 a3">109.00
         <TD headers="a10 a11 a4">36.00
         <TD>
     <TR>  
         <TD id="a12" axis="date">28-Aug-97
         <TD headers="a10 a12 a2">35.00
         <TD headers="a10 a12 a3">109.00
         <TD headers="a10 a12 a4">36.00 
         <TD>
     <TR>  
         <TD>subtotals
         <TD>131.25
         <TD>218.00
         <TD>72.00
         <TD>421.25
     <TR>   
         <TH>Totals
         <TD>196.27
         <TD>442.00
         <TD>162.00
         <TD>800.27
   </TABLE>

Links

Users who are blind often jump from link to link when skimming a page or looking for information. When they do this, only the text of the link ("link text") is read. Therefore, it is important that link text make sense when read without surrounding text.   For example, authors should not use "click here" as link text several times on the same page; this requires a user browsing the page with a screen reader to step through each link and read the surrounding text to determine the purpose of the link. Instead, link text should carry sufficient information, as in "download this document in ASCII text," "view the full version in HTML," or "for the text version select this link."

When an image is used as the content of a link, specify alt-text for the image that makes sense in context (i.e., if you were to specify text for the link content, what would it be?).

Example.

  <A href="routes.html">
     <IMG src="topo.html" 
          alt="Current routes at Boulders Climbing Gym">
  </A>

Images, image maps, applets, and objects

Images

Images may be inserted by two elements in HTML:

IMG
Available in HTML 4.0, 3.2, 2.0
OBJECT
Available in HTML 4.0.

Images include those that carry out simple animations (e.g., a "gif" image).

Alternate text for images

When using IMG, specify alt-text with the "alt" attribute.

Example

   <IMG src="magnifyingglass.gif" alt="Search">     

When using OBJECT, specify alt-text either with the "title" attribute:

Example

   <OBJECT classid="Duke.class" title="Java applet: Duke waving."
           width="50" height="50">
   </OBJECT>

or in the body of the OBJECT element:

Example

   <OBJECT data="magnifyingglass.gif" type="image/gif">
      Search 
   </OBJECT>
Brief descriptions for images

When using IMG, specify a brief description of the image with the "title" attribute:

Example

   <IMG src="bell.gif" alt="Return to home page"
        "Cow logo shaped like a bell">
Long descriptions for images

When using IMG, specify a long description of the image with the "longdesc" attribute:

Example.

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

In sales97.html:

A chart showing how sales in 1997 progressed. The chart is a pie-chart showing percentage increases in sales by month.

For browsers that don't support "longdesc", provide a description link as well next to the graphic:

Example.

   <IMG src="97sales.gif" alt="Sales for 1997">
   <A href="sales.html" title="Description of 1997 sales figures">[D]</A>

When using OBJECT, provide a long description in the body of the element:

Example.

   <OBJECT data="97sales.gif" type="image/gif">
          Sales in 1997 were down subsequent to our
          anticipated blah blah blah...
   </OBJECT>
Ascii art

Authors should avoid ascii art (character illustrations) and use real images instead since it is easier to supply alt-text and long descriptions for real images. However, if ascii art must be used, mark it up as such:

Example.

<SPAN alt="smile" title="smiley in ascii art">:-)</SPAN>

Another way to replace ascii art is to use human language substitutes. For example, <wink> might substitute for the emoticon <SPAN alt="wink" title="wink smiley">;-)</SPAN>, the word "therefore" could replace arrows consisting of dashes and greater than signs (e.g., -->), and the word "great" for the uncommon abbreviation "gr8".

Image maps

Authors must ensure that image map information is available in textual form (links) and may be navigated with the keyboard.

Image maps are created with the MAP element (available in HTML 4.0 and 3.2). The active regions of an image map are defined within the MAP element and may be created with two elements:

AREA
Available in HTML 4.0, 3.2
A
Available in HTML 4.0.

HTML allows two types of image maps: client-side (the user's browser processes a URL) and server-side (the server processes click coordinates). In general, authors should avoid server-side image maps because they require a specific input device (a mouse).

Alternate text for image maps

Users should provide alternate text for image maps since they convey visual information.

If AREA is used, use the "alt" attribute:

Example.

   <IMG src="welcome.gif" alt="Image map of areas in the library"
        usemap="#map1">

   <MAP name="map1">
     <AREA shape="rect" coords="0,0,30,30"
           href="reference.html" alt="Reference">
     <AREA shape="rect" coords="34,34,100,100"
           href="media.html" alt="Audio visual lab">
   </MAP>

The same idea, but use OBJECT instead of IMG to insert the image to provide more information about the image:

Example.

   <OBJECT data="welcome.gif" type="image/gif" usemap="#map1">
       There are several areas in the library including
       the <A href="reference.html">Reference</a> section and the
       <A href="media.html">Audio Visual Lab</A>.
   </OBJECT>
   <MAP name="map1">
     <AREA shape="rect" coords="0,0,30,30"
           href="reference.html" alt="Reference">
     <AREA shape="rect" coords="34,34,100,100"
           href="media.html" alt="Audio visual lab">
   </MAP>

If the A element is used instead of AREA, the author may describe the active regions and provide descriptive link text at the same time:

Example.

   <OBJECT data="navbar1.gif" type="image/gif" usemap="#map1">
   <MAP name="map1">
     <P>Navigate the site.
     <A href="guide.html" shape="rect"
        coords="0,0,118,28">[Access Guide]</A>
     <A href="shortcut.html" shape="rect"
        coords="118,0,184,28">[Go]</A>
     <A href="search.html" shape="circ"
        coords="184.200,60">[Search]</A>
     <A href="top10.html" shape="poly"
        coords="276,0,373,28,50,50">[Top Ten]</A>
   </MAP>
   </OBJECT>

Note in the previous example that the MAP element is the content of the OBJECT element so that the alternative links will only be displayed if the image map (navbar1.gif) is not.

Note also that links have been separated by brackets ([]). This is to prevent screen readers from reading several adjacent links as a single link. Authors should make sure they include printable characters (such as brackets or a vertical bar (|)) surrounded by spaces between adjacent links.

Brief descriptions for image maps

See the section on brief descriptions for images.

Long descriptions for image maps

See the section on long descriptions for images.

Server-side image maps

When a server-side image map must be used, authors should provide an alternative list of image map choices. There are three techniques:

Authors should avoid using a button with an image on it as a server side image map. Use separate buttons or images instead.

Applets and other objects

Applets may be inserted by two elements in HTML:

APPLET
Available in HTML 4.0 (deprecated), 3.2.
OBJECT
Available in HTML 4.0.

If an applet performs an important function other than presenting information (e.g., gathering information for a database), authors should provide alternative mechanisms for performing the same function. Alternative information-gathering mechanisms such as a user-input form, e-mail address, phone or fax number should be provided within the content of whichever element is used to embed the applet.

If an applet requires user interaction (e.g., the ability to manipulate a physics experiment) that cannot be duplicated in an alternative format, make the applet directly accessible. [@@link to resource.]

Alternate text for applets

If OBJECT is used, provide alt-text as the content of the element:

Example.

  <OBJECT classid="java:Press.class" width="500" height="500"
          title="Java applet: how temperature affects pressure">
        As temperature increases, the molecules in the balloon...
  </OBJECT>

A more complex example takes advantage of the fact the OBJECT elements may be embedded to provide for alternative representations of information:

Example.

  <OBJECT title="How temperature affects pressure"
          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>

If APPLET is used, provide alt-text with the "alt" attribute and content in the APPLET element. This enables them to fail gracefully for those user agents that only support one of the two mechanisms ("alt" or content).

Example.

   <APPLET code="Press.class" width="500" height="500"
           alt="Java applet: how temperature affects pressure">
         As temperature increases, the molecules in the balloon...
   </APPLET>
Audio information
Avoid movement

Authors should avoid creating movement in pages. However, if necessary to include an applets that involves movement or updates, authors should provide a mechanism for freezing this movement. In an example of movement control created by Mark Novak, if the user presses the escape key while the Java marquee has focus, the text will be displayed statically. Authors should use animated gifs to create movement that may be suspended by the browser for people that have trouble with it.

See also the section on text style for controlling blinking.

Style and style sheets

Style sheets should be used to control layout and presentation wherever possible in a document. CSS1 and CSS2 allow authors to duplicate almost every HTML 4.0 presentation feature and offer more power with less cost. However, until most users have browsers that support style sheets, not every presentation idiom may be expressed satisfactorily with style sheets. Until support is adequate:

@@examples?

When these techniques are used, authors must furnish alternative pages as well to ensure accessibility.

The following sections explain how to use style sheets once a majority of users use browsers that support CSS.

General style sheet techniques

Text formatting

Authors should use style sheets for text formatting rather than converting text to images. For example, stylized text on a colored background can be created with style sheets instead of as an image. This provides flexibility for people to view the text in a form that is most readable to them including magnified, in a particular color combination such as white on black, or in a particular font.

Text style

Authors should use style sheets instead of deprecated presentation elements and presentation attributes that control visual presentation.

Avoid blinking

Authors should avoid creating movement and blinking in a page where possible; blinking may cause seizures in some users and is annoying to many other users. They should also provide a mechanism for freezing movement. If style sheets are used to create an effect (e.g., 'text-decoration: blink'), users may cancel the effect through style sheets as well.

Note. Do not use the BLINK and MARQUEE elements. These elements are not part of any W3C specification for HTML (i.e., they are non-standard elements).

Indentation

Use the CSS 'text-indent' property to indent text. Do not use the BLOCKQUOTE or any other structural element to indent text.

Spacing

Authors should achieve spacing effects with the CSS 'word-spacing' property rather than by putting actual spaces between letters.

Pictures of text

In general, authors should use style sheets to specify special effects for text (colors, fonts, transformations, shadows, etc.) When this is not possible, authors may use a picture of stylized or colorful text. In this case, the alt-text for the image must be the same text represented by the image.

Example.

<P>This is an 
   <IMG src="BigRedExample.gif"
        alt="Example"> of what we mean.
</P>

This is true of Drop Caps (large first letter of a paragraph) as well. However, we recommend using style sheets to create the effect, as the following example illustrates.

Note.

<STYLE ...>
      .dropcap { font-size : 120%; font-family : Helvetica } 
</STYLE>
...
<SPAN class="dropcap">O</SPAN>nce upon a time...

Fonts

Use the many CSS properties to control font characteristics: 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', and 'font-weight'.

Colors

Use style sheets to specify colors:

Use techniques besides color to convey information

Authors must ensure that text and graphics are perceivable and understandable when viewed without color. To do so, provide other semantic clues in content or markup. For example, in this document, examples appear in a different color than the rest of the text. However, that is not enough to identify them as examples, so we precede each one with the word "Example." or "Deprecated example."

Don't use color to convey information, unless the information is also clear from the markup and/or text. To text whether this is the case, examine your page with a monochrome monitor or colors turned off.

Contrast

Authors must ensure that foreground and background color combinations provide sufficient contrast when viewed by someone with color blindness (or on a black and white screen).

[@@link to http://www.lighthouse.org]

Layout, positioning, and alignment

Layout, positioning, and alignment should be done through style sheets (notably by using CSS floats and absolute positioning).

Use table for tabular layout

Do not use PRE to create a tabular layout of text; use real tables instead (as they may be marked up helpfully).

Invisible images used for spacing

If authors cannot use style sheets and must use invisible or transparent images to lay out images on the page, they must supply "null" (alt="") or "white space" (alt=" ") alt-text, whichever the context requires. Note that the HTML 4.0 specification recommends that attribute values not contain leading or trailing spaces. It states, "User agents may ignore leading and trailing white space in CDATA attributes values (e.g., "myval&nbsp;" may be interpreted as "myval")." Therefore, empty alt-text (alt=" ") might be ignored.

Deprecated example.

In this example, an image is used to create a carefully defined space between words or graphics. "White space" alt-text is used to prevent the words from running together when the image is not loaded:

   my poem requires a big space<IMG src="10pttab.gif" alt="&nbsp;&nbsp;&nbsp;">here

In this next example, an image is used to force a graphic to appear in a certain position:

   <IMG src="spacer.gif" alt="">
   <IMG src="colorfulwheel.gif" alt="The wheel of fortune">

Rules and borders

Rules and borders may convey the notion of "separation" to visually enabled users but that meaning cannot be inferred out of a visual context.

While authors may use HR to create a horizontal rule, they should do so in a way that also conveys the structure in a non-visual way (e.g., by using DIV in conjunction with the "class" attribute).

Example.

   <DIV class="navigation-bar">
      <HR title="navigation-bar">
      <A rel="Next" href="next.html">[Next page]</A>
      <A rel="Previous" href="previous.html">[Prevous page]</A>
      <A rel="First" href="first.html">[First page]</A>
   </DIV>

When using graphics (e.g., horizontal rules) as section separators, authors should provide a brief description of what the graphic represents to the visually enabled user via the "title" attribute. Hence, in the previous example, we specified title="navigation-bar".

Example.

In this example, a red line is used to separate Chapter 7 from Chapter 8:

   <IMG src="redline.gif" title="End of Chapter 7 - Visual Displays">
   <H1>Chapter 8 - Auditory and Tactile Displays</H1>

We recommend using style sheets to accomplish such styling of the line:

   <STYLE type="text/css">
        HR.redline { color : red }
   </STYLE>
   <IMG class="redline" title="End of Chapter 7 - Visual Displays">
   <H1>Chapter 8 - Auditory and Tactile Displays</H1>

Frames

For visually enabled users, frames may organize a page into different zones. For non-visual users, relationships between the content in frames (e.g., one frame has a table of contents, another the contents themselves). must be conveyed through other means.

Name frames for easy orientation

For reasons of orientation, frames should all be named (with the "name" attribute) even if they are not potential targets for updated content.

Example.

<FRAMESET cols="10%,90%"
          title="Our library of electronic documents">  
    <FRAME src="nav.html" name="navbar" title="Navigation bar">  
    <FRAME src="doc.html" name="doc"    title="Documents">
    <NOFRAMES>
       <A href="lib.html" title="library link">   
             Select to go to the electronic library</A>  
    </NOFRAMES>
</FRAMESET>

Brief descriptions of frames

Authors should provide a brief description of each frame with the "title" attribute.

Long descriptions of frames

Authors should provide a long description of a frame (where needed) by using either "longdesc" or "d-links" in a NOFRAMES element.

Example. Under construction

Ensure documents are readable without frames

Authors must ensure that pages are readable and usable without frames. This may be done by providing a NOFRAMES alternative at the end of each FRAMESET.

Example.

In this example, if the user reads "top.html":

  <!-- This is top.html -->
   <HTML>
   <HEAD>...</HEAD>
   <FRAMESET cols="50%, 50%" title="Our big document">
       <FRAME src="main.html" title="Where it's all at">
       <FRAME src="table_of_contents.html" title="Table of Contents">
       <NOFRAMES>
           Here's the <A href="main.html">non-frames version.</A> 
       </NOFRAMES>
   </FRAMESET>
   </HTML>

and the user agent is not displaying frames, the user will have access (via a link) to a non-frames version of the same information. Furthermore, we can build main.html so that if frames are being supported, main.html does not show a table of contents (since top.html does), and if frames aren't being supported, it does not:

   <!-- This is main.html -->
   <HTML>
     <HEAD>...</HEAD>
     <BODY>
     <NOFRAMES>
           ...the table of contents when frames not supported...
     </NOFRAMES>
          ...the rest of the document, always available...
     </BODY>
   </HTML>

Always make the source of a frame an HTML document

Authors must provide descriptions of frames so that their contents and the relationships between frames make sense. Note that as the contents of a frame change, so must change any description. This is not possible if an IMG is inserted directly into a frame, as in this deprecated example:

Deprecated example.

   <FRAME name="badframe"
          src="apples.gif" title="Apples">

Note that if, for example, a link causes a new image to be inserted into the frame:

  Visit a beautiful grove of 
  <A target="badframe" src="oranges.gif" title="Oranges">oranges</A>

the initial title of the frame ("Apples") will no longer match the current content of the frame ("Oranges").

To solve this problem, authors should always make the source ("src") of a frame an HTML file. Images may be inserted into the HTML file and their descriptions will evolve correctly.

Example.

   <FRAME name="goodframe" src="apples.html" title="Apples">
   <!-- In apples.html -->
   <HTML>
   ...
   <IMG src="apples.gif" alt="Apples">
   ...
   </HTML>

Avoid opening a new window as the target of a frame

Authors should not open windows or change active windows (e.g., by specifying a new window as the target of a frame with target="_blank") unless the user is aware that this is happening.

Forms

Group form controls

Authors should group form controls into semantic units with the FIELDSET element and label those units with the LEGEND element (both available in HTML 4.0):

Example.

<FORM action="http://somesite.com/adduser" method="post">
   <FIELDSET>
   <LEGEND align="top">Personal information</LEGEND>
   <LABEL for="firstname">First name: </LABEL>
   <INPUT type="text" id="firstname" tabindex="1">
   <LABEL for="lastname">Last name: </LABEL>
   <INPUT type="text" id="lastname" tabindex="2">
   ...more personal information...
   </FIELDSET>
   <FIELDSET>
   <LEGEND align="top">Medical History</LEGEND>
   ...medical history information...
   </FIELDSET>
</FORM>

Label form controls explicitly

Authors should use the LABEL element with the "for" attribute (available in HTML 4.0) to associate labels with their controls explicitly. For an example, see the previous section.

Group menu options

For long lists of selections (which are hard to remember), authors should group items into a hierarchy using the OPTGROUP element (available in HTML 4.0).

Example.

<FORM action="http://somesite.com/prog/someprog"
      method="post">
<P>
 <SELECT name="ComOS">  
    <OPTGROUP label="Comm Servers"> 
       <OPTGROUP label="PortMaster 3">
          <OPTION label="3.7.1" value="pm3_3.7.1">
               PortMaster 3 with ComOS 3.7.1      
          <OPTION label="3.7" value="pm3_3.7">
               PortMaster 3 with ComOS 3.7      
          <OPTION label="3.5" value="pm3_3.5">
               PortMaster 3 with ComOS 3.5  
       </OPTGROUP>  
       <OPTGROUP label="PortMaster 2">
          <OPTION label="3.7" value="pm2_3.7">
               PortMaster 2 with ComOS 3.7      
          <OPTION label="3.5" value="pm2_3.5">
               PortMaster 2 with ComOS 3.5  
     </OPTGROUP>  
  </OPTGROUP>
  <OPTGROUP label="Routers">      
     <OPTGROUP label="IRX">      
         <OPTION label="3.7R" value="IRX_3.7R">
               IRX with ComOS 3.7R      
     <OPTION label="3.5R" value="IRX_3.5R">
               IRX with ComOS 3.5R  
     </OPTGROUP>  
  </OPTGROUP>
  </SELECT>  
</FORM>

Techniques for specific controls

Scripts

Authors must ensure that pages are accessible with scripts turned off or in browsers that don't support scripts.

Alternative presentation of scripts

Authors should provide alternative presentations of content for each script that conveys information. One way to accomplish this is with the NOSCRIPT element (available in HTML 4.0). The content of this element is rendered with scripts are not enabled.

Example.

<SCRIPT type="text/tcl">
 ...some Tcl script to show a billboard of sports scores...  
</SCRIPT>
<NOSCRIPT>     
   <P>Results from yesterday's games:</P> 
   <DL>
      <DT>Bulls 91,  Sonics 80.
      <DD><A href="bullsonic.html">Bulls vs. Sonics game highlights</A> 
      ...more scores...  
   </DL>
</NOSCRIPT>

Acknowledgments

WAI Markup Guidelines Working Group Co-Chairs:
Chuck Letourneau, Starling Access Services
Gregg Vanderheiden, Trace Research and Development
Staff contacts:
Judy Brewer and Daniel Dardailler
 
Special thanks to the following people who have made major contributions to shaping the content of this Working Draft:
Harvey Bingham, Daniel Dardailler, Al Gilman, Jason White
 
In addition we would like to thank the following people who have contributed through review and comment:
Judy Brewer, Kevin Carey, Chetz Colwell, Neal Ewers, Geoff Freed, Larry Goldberg, Jon Gunderson, Phill Jenkins, Leonard Kasday, George Kerscher, Josh Krieger, Scott Luebking, William Loughborough, Murray Maloney, Charles McCathieNevile, MegaZone (Livingston Enterprises), Masafumi Nakane, Charles Oppermann, Mike Paciello, David Pawson, Michael Pieper, Greg Rosmaita, Liam Quinn, Dave Raggett, T.V. Raman, Robert Savellis, Jutta Treviranus, Steve Tyler, Jaap van Lelieveld

The original draft of this W3C working document is based on The Unified Web Site Accessibility Guidelines compiled by the Trace R & D Center, University of Wisconsin under funding from the National Institute on Disability and Rehabilitation Research (NIDRR),  U.S. Dept. of Education.

For a full list of Contributors to the Unified Guidelines is available at http://trace.wisc.edu/docs/html_guidelines/version7.htm .

We would also like to thank the people listed in the References section below whose works were used in the compilation of the unified guidelines on which this document is based.

References

Normative References

  1. HTML 4.0 Recommendation
  2. HTML 3.2 Recommendation
  3. CSS 2 Recommendation
  4. CSS 1 Recommendation

Informative References

  1. Accessible Design for Users with Disabilities. -- Sun Microsystems
  2. The Accessible Web: Web Access Through Adaptive Technology -- Kevin Nguyen, University of Toronto
  3. ALT text recommendations, and notes on viewing situation -- A.J. Flavell, University of Glasgow
  4. Alternative Access to the World Wide Web -- University of Toronto
  5. Any Browser Table Format -- Department of Missions, Abilene Christian University
  6. Best Viewed With Any Browser -- Accessible Site Design
  7. Compatibility & Accessibility -- All Things Web
  8. Composing Good HTML -- James "Eric" Tilton.
  9. Design Considerations: Readers with Visual Impairments -- Arthur R. Murphy
  10. Designing Access to WWW Pages - Alliance for Technology Access.
  11. Designing HTML Tables to Work with HTML 2.0 Browsers -- Stanton McCandlish
  12. DO-IT HTML Guidelines -- University of Washington
  13. Experiences Implementing Web Accessibility Guidelines in IBM -- Phill Jenkins
  14. For Web Page Designers -- Microsoft
  15. GSA HTML Accessibility Guidelines -- Paul Fontaine
  16. Guide to Writing Accessible HTML -- University of Toronto
  17. Hints for designing accessible Websites -- Royal National Institute for the Blind
  18. IBM Web Design Guidelines  -- IBM Human Computer Interaction (HCI)
  19. IBM Guidelines for Writing Accessible Applications Using 100% Pure Java -- IBM Special Needs Systems
  20. Increasing Access to World Wide Web Sites for Blind and Visually Impaired Computer Users -- Dena Shumila, Jan Richards
  21. InfoUse Web Accessibility Guidelines -- Jane Berliss, Lewis Kraus, Susan Stoddard
  22. LEVELLING THE ROAD AHEAD: GUIDELINES FOR THE CREATION OF WWW PAGES ACCESSIBLE TO BLIND AND VISUALLY HANDICAPPED USERS, Judith M. Dixon, Ph.D., Consumer Relations Officer, National Library Service for the Blind and Physically Handicapped
  23. The Lynx Manifesto -- Dehanced for Lynx
  24. Making Your Site Speech Friendly -- Cathy Anne Murtha, Web Design and Access Specialist, Magical Mist Creations
  25. NCSA Mosaic Access Page
  26. Nimble Document Navigation Using Alternative Access Tools -- Jutta Treviranus, University of Toronto
  27. Starling Access Services Accessible Web Page Design -- Chuck Letourneau
  28. Tables on non-table browsers -- A.J. Flavell, Glasgow University
  29. Universal Accessibility -- Government of Canada Internet Guide
  30. Universal Design of WWW Pages -- a DO-IT (University of Washington) Brochure
  31. Universal Information Access on the WWW (COCA)
  32. "Universal Specifications" Accessibility Standards for Web Design -- New South Wales Attorney General's Department
  33. Usability of Information and the WWW -- UCLA Disabilities and Computing Program
  34. IBM Web Accessibility Guidelines -- IBM Special Needs Systems
  35. World Wide Web Access: Disability Discrimination Act Advisory Notes -- Australia

Index of Elements and Attributes

Under Construction

This index will list elements and attributes in alphabetical order and link each to pertinent techniques in this document as well as their definitions in the HTML 4.0 specification.