241
CHAPTER
Making Sites Accessible 10
Progressive Enhancement
Someday, we may reach the long-sought goal of having browsers
that all display pages the same. Today, however, we have a
mixture of browsers with different capabilities. Progressive
enhancement allows you to have a basic page that appears on
all browsers, and then added features such as JavaScript menus
that appear on browsers that support it. This way, those with
browsers with richer features get a better experience, but
everyone can access the content.
Products
Services
About Us
Locations
Red Widgets
Blue Widgets
Green Widgets
East
Central
West
Products
Services
About Us
Locations
East
Central
West
vs.
Good Code Solves Display Issues
Many beginners labor under the misconception that because browsers do
not display errors for bad or invalid HTML, writing good code does not
matter. Unfortunately, not displaying errors does not mean that the
browsers do not have problems with bad code. More often than not,
browser display issues, even those seemingly caused by CSS, can be solved
by simply ensuring that your HTML is correct.
Validation
From the beginning, browsers have been designed to ignore bad
code. When they encounter an HTML tag they do not recognize,
they simply ignore it. Thus, you do not get errors when you have
mistakes on your page. Validation offers a solution: By using a
free online service such as http://validator.w3.org, you can check
your page to be sure that you are using proper code.
<!DOCTYPE HTML PUBLIC
<meta hp-equiv="Conten
//v3.0 var i,x,a=documen
x.src=x.oSrc; } funcon MM
if(!d.MM_p) d.MM_p=ne
f (a[i].indexOf("#")!=0){ d.
f(!d) d=document; if((p=n
n.substring(p+1)].docum+
CCCCCTTTTTYYYYYPPPPPEEEEE HHHHHTMMMMMLLLLL PPPPPUUUUU
eeeeettttta hpppppppp-------eeeeeeeeqqqqqqqqquuuuuuiiiivvvvvv======="CCCCCCCooooooonnnnntttttt
//////////v 3333 ........ 000000000 var i,x,a=docummmeee
pq
x.srccccccccc====
iif(((((!!!
(((((((aaaaaaa
ddd