Frames

Generally, you should avoid the use of frames, unless it improves the usability of your site substantially.

Accessible Frame Navigation

When disable people who use assistive technology visit a FRAMESET page, they must choose which frame to open from a list of frames on the page. You must provide meaningful frame titles, so that disable users can easily identify the frame they want to open.

To achieve this:

  • include meaningful titles on the source page for each frame by using the TITLE element
  • assign a meaningful TITLE and NAME attribute for each FRAME element on the FRAMESET. page

For example:

<HEAD>
<TITLE>A simple frameset document</TITLE>
</HEAD>
<FRAMESET>
<FRAME src="logo.html" title="company logo" name="company logo">
<FRAME src="navigation.html" title="navigation" name="navigation">
<FRAME src="maincontent.html" title="main content" name="main content">
<NOFRAMES>
This page contains three frames which can be accessed separately.<br>
The first frame is our <A HREF="logo.html">Company logo</A><br>
The second frame is for <A HREF="navigation.html">navigation</A><br>
The third frame is for the <A HREF="maincontent.html">main content</A>
<NOFRAMES>
</FRAMESET>

Accessible Frame Source

To create an accessible frame source, the source of the FRAME element should always be an HTML file.

However, if the source of a FRAME is an image file, then you can't add an alternative text (ALT) attribute. Therefore, the source of the frame is inaccessible.

The solution is to link to a HTML file, which contains an image tag with alternative text attributes.

NOFRAMES Element

Use the NOFRAMES tag to specify equivalent content for browsers that cannot support frames, or are configured not to display frames.

You could also use the NOFRAMES tag and link to a single Web page that combines the content of all the frames.