Article: Frames and accessibility
Frames: accessibility techniques and issues
- Browsers that do not support frames will display a page with a link to each frame. Each frame should have a title that adequately describes the frames content.
- Describe the purpose of each frames and how they relate to each other, if it is not obvious by the frame titles alone.
- The <noframes> element can be used to point to version of the site that does not use frames, or provide links to the individual frames. Information about the purpose of each frame can be provided in the <noframes> section.
- The 'Frameset' document type definition (DTD) should be provided at the top of frames based Websites.
- Frames can be inaccessible to users of screen magnification software, screen-readers, and some hand-held devices.
- Because more than one windows is squeezed onto the screen, the size of each frame can be so small that text is truncated. This can be a particular problem for people with a visual impairment who have increased the font size, and for users with small monitors.
An example
<html>
<head>
<title>Frameset example</title>
</head>
<frameset cols="15%, 85%">
<frame src="navigation.html" title="Sitewide navigation." name="Sitewide navigation">
<frame src="access.html" title="Web design tips." name="Web design tips">
<noframes>
<A href="noframespage.html" title="No frames version.">Click for the frames free version of this Website. </noframes>
</frameset>
<html>
Frames and usability
Question: If an important aim of my Website is for it to be accessible, should I use frames on it? The W3c point out that they can be accessible if I take the appropriate precautions - so what's the problem?
The W3c techniques document also says,
"Frames as implemented today (with the FRAMESET, FRAME, and IFRAME elements) are problematic for several reasons:
- Without scripting, they tend to break the "previous page" functionality offered by browsers.
- It is impossible to refer to the "current state" of a frameset with a URI; once a frameset changes contents, the original URI no longer applies.
- Opening a frame in a new browser window can disorient or simply annoy users.
...We also provide an alternative to frames that uses HTML 4.01 and CSS and addresses many of the limitations of today's frame implementations."
http://www.w3.org/TR/WCAG10-HTML-TECHS/#alt-frames
I would also add:
- Using frames on a Website is not 'forward compatible'. Although frames are not specifically named as a deprecated element - the goal of HTML 4 and the use of CSS is to enable the layout of pages without the use of frameset elements or attributes. The 'strict' Document Type Definition for HTML 4 does not allow the use of frameset elements.
- Frames don't always work well, even in browsers that do support them
- Scripting is often used In order to overcome all of the problems of using frames with browsers that do understand frames, i.e. can't bookmark the current page, the back button doesn't work, frequent printing problems and 'focus' problems. Many text only browser do not understand scripts - and the site can become unusable as a result.
- The latest browsers try to help the bookmark problem, by allowing the browser to bookmark "this frame" using the right-button menu. But when the user returns to that bookmark, they only see one frame - completely missing the navigational tools.
- It is harder to code and maintain a good frames based site than a non frames site. There are all the browser problem work-arounds to figure out - plus all of the techniques required to make them accessible
For techniques see:
W3c: http://www.w3.org/TR/WCAG10-HTML-TECHS/#alt-frames and
IBM: http://www.webreview.com/2001/04_27/webauthors/index04.shtml - Using frames means the pages will not conform with the way the rest of the Web works - i.e. on the majority of pages, each page is a single unit, with a single address, and he back button takes the user back to the page previously visited. Straying from this model means that skills learned on a frames based site can't be generalised to the rest of the Web.
- Frequently the browser will not set the "focus" to the right frame. This means the user must first use the mouse to select the desired frame before using the keyboard to scroll that frame, or to interact with forms in that frame.
- Frames typically take up a great deal of real estate. This is particularly relevant when we know that some users will be using 15" screens set to the default resolution of 640 * 480. It is likely that they will have to scroll horizontally to see all the content of frames.
- With many browser it is difficult to print the correct frame - often you think you are printing the body of the page but you print the navigation.
- Jakob Neilson discusses frames in this, old but still relevant, article called, Why Frames Suck (Most of the Time)
- In a properly designed site that uses frames it is possible for someone using a text only browser to navigate through a frames based site - but unless the author of the site has thought of accessibility issues - it is likely to be more confusing and easier to get lost in the site than it would be if the site was not frames based.
- And then there is the problem that they will make the site look like it was designed in 1997 when frames were all the rage. ouch!
As you can guess, I don't regard frames as being a good design choice - even if with a lot of work and testing they could be made accessible.
