2.04 Common issues: Frames
From the Becta document
Before starting on the Level A WAI requirements for using frames, it is generally recognised that their implementation can have severe problems and you may be best to avoid them altogether.
Frames have numerous issues: they can be difficult to bookmark, it can be difficult for the browser to know which frame is the active frame and they can be difficult for search engines to index correctly
When people using non-graphical browsers visit a frameset
page, they have to choose which frame to open from a list. If Web authors provide meaningful frame titles, users can easily identify the frame they wish to open. Frames should be properly named with content-oriented descriptive names (e.g. navigation, content, links) - not with positional frame identifiers (e.g. top, right, main).
- Provide a meaningful
title
and name attributes for each frame in the frameset. - Each referenced page should also have a meaningful title.
- Ensure that each frame references a real HTML page rather than just a "spacer" frame.
How should they be coded?
Note:
- Each frame references a real HTML page. e.g.
src="url_frame.html"
. - Each frame has a meaningful name. e.g.
name="html_frame"
. - Each frame has a meaningful title. e.g.
title="CSS validation result"
. - There is a noframes section in case the user's browser cannot handle framesets.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Page Checker</title>
</head>
<frameset rows="80,*,*,*">
<frame src="url_frame.html" name="url_frame" title="URL to check" id="topFrame" />
<frame src="html_frame.html" name="html_frame" title="HTML validation result" id="html_frame" />
<frame src="css_frame.html" name="css_frame" title="CSS validation result" id="css_frame" />
<frame src="link_frame.html" name="link_frame" title="Link checker result" id="link_frame" />
<noframes>
<body>
<h1>Sorry</h1>
<p>This page's function requires the use of frames. It checks a single URL against the W3C's HTML & CSS validators and also checks the links in the page.</p>
<p>Each of these functions may be acomplished without frames though one at a time. Please visit:</p>
<ul>
<li><a href="http://validator.w3.org/">HTML validator</a>.</li>
<li><a href="http://jigsaw.w3.org/css-validator/">CSS validator</a>.</li>
<li><a href="http://validator.w3.org/checklink">Link checker</a>.</li>
</ul>
</body>
</noframes>
</frameset>
</html>
The example shown is for the page validator and link checker.
Who does this affect?
- Search engine issues.
- Difficult to bookmark.
- Text-only browsers.
WAI guidelines on frames
- 12.1 Title each frame to facilitate frame identification and navigation.
For example, in HTML use the "title" attribute on frame elements. [NGfL requirement] - (NGfL guideline) Ensure that each frame references valid HTML file. [NGfL warning]
- (NGfL guideline) Ensure that each referenced frame has a meaningful page title. [NGfL warning]