Using frames


Frames titles should indicate frame content and navigation.

Each frame should have a title that helps the user understand the frame's purpose.

A frameset combines at least two other separate Web pages in the same window of a browser. Although recent screen readers can interpret frames, frames can still be disorienting to the user. Over the last several years, the use of frames has become less common, since the effect can often be simulated by the reduplication of banners and navigation structures on each page. If you do choose to employ frames, use the "title" attribute of the <FRAME> element to describe each frame's purpose, as in the following example:

<FRAMESET cols="15%, 85%">

<FRAME src="menu.html" title="Navigation menu"name="menu">

<FRAME src="content1.html" title="Main content" name="content">

The "name" attribute of the <FRAME> element can be used for targeting and should not be regarded as a functional replacement for the title attribute. The <FRAME> element also implements the "longdesc" attribute (see Creating Alternative Text), which should be used to supplement the short description provided by the title attribute.

Alternative <NOFRAMES> content should always be available if the user cannot or chooses not to view frame content. The <NOFRAMES> content should indicate what the contents of the frames are and provide links to individual frame pages if appropriate, as in this example.

<NOFRAMES>
<P>This frameset document contains:
<UL>
	<LI><a href="menu.html">Page navigation</A>
	<LI><a href="content1.html">Main content</A>
</UL>
</NOFRAMES>
</FRAMESET>

These two pieces of sample code could be joined to form a complete frameset.

If you are using Dreamweaver MX, you can activate the Frame Tag Accessibility Attributes Dialog Box by selecting Edit>Preferences>Accessibility and choosing the Frames Checkbox. Then whenever you insert a frame in the Design window, the following dialog box will appear:

Frame Tag Accessibility Attributes dialog box

The dialog box includes a text field for entering the title as well as a dropdown list of name attribute values for the current frame and all pre-existing frames. In Dreamweaver, frames automatically use a naming convention based on positioning (e.g. "leftFrame" or "mainFrame"). You can only change these frame names in the code view.

This description has been adapted from the frames page at www.webaim.org.

Printer-friendly version