Previous Message
Next Message

Toogle CSS off with W3C DOM - FIR uses wrong tool

Sent by Peter-Paul Koch on 28 October 2003 18:06


>I am working on a website which I realise uses FIR (Fahrner Image
>Replacement) to present visual browsers with images and screen readers with
>text.
>It uses display: none to hide text from visual browsers presenting a css
>background-image and relies on JAWS to incorrectly read 'hidden' text.
>
>My problem is those users who have a css capable browser and switch images
>off. They see nothing.
>
>Is there any way with W3C Dom level1 to toogle the css display property on
>or off depending on whether the user has images switched on i.e. something

As far as I know that's not possible.

You set me thinking, though. I dislike FIR because of its CSS hackiness, 
even though I like the concept. But I suddenly saw what we're doing wrong.

We're using the wrong tool. Our error is that we try to replace text by 
images in CSS, while we *should use JavaScript*!

Serve the page with normal text in the headers, then run a script that 
*replaces* the text by an image.
This solves all accessibility issues at one stroke. As a bonus you don't 
need complicated and potentially hazardous CSS any more, just a few lines of 
script and some strategically placed data sources.

Of course we'd lose the few noscript users, but so what? The replacement 
isn't essential, it's just a nice extra.

Interesting idea. I'll try to write a script.

(BTW: Is "should we use CSS or JavaScript for this effect" on topic? If not, 
the thread should end here)

-------------------------------------------------------------------
ppk, freelance web developer
Interaction, copywriting, JavaScript, integration
http://www.xs4all.nl/~ppk/
Column "Keep it Simple": http://www.digital-web.com/columns/keepitsimple/
------------------------------------------------------------------

_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail

______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Possibly related: