HTML frames can be problematic because 1) some older browsers, including the text browser Lynx do not support them 2) individual pages can be hard to bookmark 3) the hierarchy of the pages may not be clear in screen reading mode and 4) there is less screen space that can be used to present content.
For that reason, many users manually switch out of frames view for many sites. Consider avoiding frames unless they are needed for a particular Web application. If frames are needed, remember these tips:
If you use frames, clearly identify each frame in the following ways.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> SECTION 508 - Frames shall be titled with text that facilitates frame identification and navigation.
Whenever possible, include duplicate navigation within the content frame, especially a link to a sitemap, in case users "right-click" to just open up the content frame only (thus manually leaving frames mode)
Include <noframes> content including basic navigation for older browsers which do not support frames.
A link to a "No Frames" version is often recommended. Placement towards the top of the homepage is best.
Alternative to frames include tables and server side includes to place in standardized headers and navigation.
|
Top Title Frame
My Accessible Frames Site |
|
|
Left Navigation Frame MAIN MENU No Frames View |
Right Content Frame
H1 Header Here for Page TitleRest of content Duplicate navigation for accessibility |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<head>
<title>A page that contains frames</title>
</head>
<body>
....
<frameset rows="80,*" frameborder="no" framespacing="0" border="0">
<frame src="titlebar.html" title="My Page Titlebar">
<frameset cols="175,*" frameborder="no" framespacing="0" border="0">
<frame src="mainmenu.html" title="Main Menu" name="mainmenu">
<frame src="initialcontent.html" title="Page Content" name="content">
</frameset>
Note that all NAMES , TITLES and file names indicate which type of content is available. Avoid using generic names like "left frame" or "frame01".
Here is an example of NOFRAMES code with skeletal navigation makes the site accessible to non-frames browsers.
<noframes>
<h1> Welcome </h1>
<p> This page... </p>
<h2> Main Menu </h2>
<ul> /!-- Alternative No Frames Navigation --/
<li> <a href="page1.html">Page 1</a></li>
<li> <a href="page2.html">Page 2</a></li>
<li> <a href="page3.html">Page 3</a></li>
<li> <a href="pagen.html">Page n</a></li>
</ul>
</noframes>
</frameset> </html>