E-mail List Archives
RE: Delivering alternate stylesheets
From: Paul Bohman
Date: Feb 24, 2003 5:50PM
- Next message: Terence de Giere: "Re: Recommended method for identifying a line in an "Accessible PDF""
- Previous message: Rich Candy: "Delivering alternate stylesheets"
- Next message in Thread: Leo Smith: "Re: Delivering alternate stylesheets"
- Previous message in Thread: Rich Candy: "Delivering alternate stylesheets"
- View all messages in this Thread
Using JavaScript in this context isn't all bad--it will do the job for the
vast majority of users, even those using screen readers, since most of them
use Internet Explorer with JavaScript turned on.
Some people are of the opinion that JavaScript should never be used. Some of
these people are probably on this list. In my opinion, though, the only
JavaScript that I don't like is JavaScript that:
A. requires a mouse to be used for important functionality (e.g. fly-out
menus with no alternative method of accessing the menu items)
B. causes confusing or unpredictable behaviors (e.g. changes the focus
without warning, causes an ad to float across the screen, links that do
nothing when clicked except some sort of visual event, popup ads, etc.)
C. causes a site to fail when JavaScript is disabled
Assuming that you have some sort of fall-back style implemented when
JavaScript is disabled, I see no problem with using JavaScript to detect the
user's browser and serve out tailor-made style sheets. If the site layout is
completely done in CSS, then the page should at least linearize in a logical
way when JavaScript is turned off (and when styles are turned off).
So, assuming that you have planned for contingencies, my advice would be go
ahead and use the JavaScript. BUT...
There is another way that you should be aware of, which does not require
JavaScript. You can use a single style sheet for all browsers if you code
the style sheet to take advantage of browser limitations and bugs. It is
like making the multiple versions of CSS all in the same CSS file.
It takes some time and patience to learn these techniques, but they work. I
suppose that you may find that there are some circumstances which you cannot
make work in this way, but so far I haven't run across any serious
limitations yet in my own CSS work. (Or I should say that I haven't run
across any that I wasn't able to fix via some workaround.)
One resource that you can look at to find the workarounds is
http://w3development.de/css/hide_css_from_browsers/
Paul Bohman
Technology Coordinator
WebAIM (Web Accessibility in Mind)
www.webaim.org
Center for Persons with Disabilities
www.cpd.usu.edu
Utah State University
www.usu.edu
---
*Register now*
WebAIM's Online Web Accessibility Training Event 2003
at www.webaim.org/training2003/
Dates: March 31-April 18
This event offers invaluable instruction and resources for developers,
managers/administrators, and accessibility trainers. Be a part of it!
---
- Next message: Terence de Giere: "Re: Recommended method for identifying a line in an "Accessible PDF""
- Previous message: Rich Candy: "Delivering alternate stylesheets"
- Next message in Thread: Leo Smith: "Re: Delivering alternate stylesheets"
- Previous message in Thread: Rich Candy: "Delivering alternate stylesheets"
- View all messages in this Thread