[map]A Technology Pattern from
Patterns for Personal Web Sites

Graceful Failure

While it's comforting to imagine that your site's visitors will be using a recent browser that implements the latest standards, the reality is different. Older browsers are still in use; some people disable active content (e.g., Javascript); disabled people might use special technology to read your site. Your site will be presented differently to each of these audiences. If you don't ensure that your site works on browsers without the capabilities you expect, it will become unusable.

Therefore, use technology that fails gracefully. If a visitor's browser isn't capable of rendering the site as you intended, it should still be usable.

There are a number of ways to make your site accessible. For example, use of the IMG tag's ALT and LONGDESC attributes allow your site to be usable if images aren't loaded. Cascading style sheets, used with care, provide a flexible method for making your site look good while still preserving usability on browsers that don't render CSS.

An example of this pattern is this site's markers, which survives failing twice. Browsers that render style sheets display the markers as styled text (e.g., [Updated on Sept 14]). This fails on non-CSS graphic browsers, which instead display similar images ([Updated on Sept 14]). This fails a second time if images are turned off, and always on text browsers. In these cases, equivalent ALT text ("Updated on Sept 14") is displayed.

An example of breaking this pattern is Javascript hyperlinks. On Javascript-disabled browsers, such links are completely unusable.



Last updated 14 September 2003
http://www.rdrop.com/~half/Creations/Writings/Web.patterns/graceful.failure.html
All contents ©2002-2003 Mark L. Irons