The problem with Frames
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 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): http://www.useit.com/alertbox/9612.html
- 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.
There rest is from other people this is the one that suits my arguement best: http://www.htmlhelp.com/design/frames/whatswrong.html from http://www.boutell.com/cielweb/ Why Frames Are A Problem 1. Older web browsers do not support frames at all 2. Web browsers for handheld devices usually ignore frames, using the "<noframes>" content instead, if any is provided 3. Text-based browsers offer, at best, a menu of the available frames 4. Frames are individual documents which must be retrieved individually from the web server, slowing down the user. You might expect them to be reused, but you'd be surprised; read on to see why unique <frameset> pages for almost everything are necessary. 5. Frames don't work well, even in browsers that do support them: 5a. In Netscape 2.0, the "BACK" button takes you all the way out of the entire frameset; it does NOT reverse your most recent navigation in an individual frame, contrary to the user's expectations 5b. In all frames-capable browsers, users cannot bookmark "what you see now" if frames are being used, unless the pages were created using a tedious workaround; see 5c. below. The latest browsers try to help, by allowing the browser to bookmark "this frame" using the right-button menu. But when the user returns to that bookmark, they only see that one frame -- completely missing the other frames you lovingly designed to provide navigational tools ... and to sell stuff. You don't want that to happen, do you? 5c. Designers can work around 5a. and 5b. by creating a unique top-level <frameset> web page "wrapper" for absolutely EVERY document, writing every single link in every single page with a target="_top" attribute. This does provide something to bookmark and to "BACK" up from; however this is extremely inconvenient and difficult to maintain consistently, with no exceptions, across your entire web site. 5d. It is possible to automate 5c. using Perl scripts, but if you're going to do that, why not write scripts that build lovely tables instead of bothersome frames? They will load faster, render better, crash browsers less, and provide the same services. 5e. 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. 5f. Frames typically take up a great deal of real estate. Compare this to table cells, the sizes and borders and layout of which can be specified more precisely. More - from Jim - frames rarely print correctly - you think you are printing the body of the page but you print the navigation. See also http://www.zerocattle.com/style_frames.html From the above site: Less viewable space for information on the screen. * Bookmarking can be problematic, foiling user's attempts to get to a specific page on the site. Solutions are more cumbersome and add to load time. * Printing the pages becomes problematic for the user. * Poor targeting can trap other site's pages or lead to doubling (the Russian Doll effect -- see image to the right). * Overuse of frames and frame borders is visually appalling. The user will not know where to look for the information (especially if there are multiple scroll bars as well). * Users do not always wish to use a site in the manner in which it was designed -- frames reduce the flexibility somewhat. * Frames are not supported by all browsers and operating systems potentially used to view the site. Jim Thatcher says that frames can be used ot increase accessibility.