Suggested change to the javascript - for screenreaders/accessibility

7 views
Skip to first unread message

Tom Adams

unread,
Mar 24, 2009, 5:47:40 AM3/24/09
to cufón
Hi,

Fantastic work! Just one small problem...
I'd like to suggest a small code change to make Cufon work with
screenreaders - at the moment I can't use it on any of my sites
because screenreaders ignore most of the replaced text (which is a
massive shame because otherwise it's near perfect!)

Currently the display:none on replaced text causes problems in Jaws -
only replaced text which includes links is read out, plus, depending
on the browser, <h1>s.

I've downloaded the source, made a couple of changes and created a
test suite - and the amended version seems to work fine in Jaws:

http://www.sonofswiss.co.uk/cufon-test/
http://www.sonofswiss.co.uk/cufon-test/amended.html

Changes are detailed below - but all I've done is replace the
display:none for replaced text with off-screen absolute positioning.
I've tested my amended page in IE6, IE7 (not IE8 yet), FF3, Safari 4b,
Chrome and Opera 9, and it seems OK (but you guys will know better
what issues to look out for!)

Could I ask that this is added into the codebase?
That way, I can start using this on sites safely, and I can start
recommending it to other people too :-)

---
Changes:

line 554:
'}.cufon-canvas .cufon-alt
{position:absolute;left:-999em;top:-999em;overflow:hidden;}' +

line 562:
'.cufon-canvas .cufon-alt
{display:inline;position:static;left:auto;top:auto;overflow:visible;}'
+

line 768:
'.cufon-vml .cufon-alt
{position:absolute;left:-999em;top:-999em;overflow:hidden;}' +

line 773:
'.cufon-vml .cufon-alt
{display:inline;position:static;left:auto;top:auto;overflow:visible;}'
+

Simo Kinnunen

unread,
Mar 24, 2009, 5:31:06 PM3/24/09
to cu...@googlegroups.com
Hi Tom,

That's a good idea, thanks! I'll adopt it (slightly modified) to the
official tree once the IE8-friendlier version is out (which will be
today, since no issues were found). I'll reply again when I've added it.

Simo

Tom Adams

unread,
Mar 24, 2009, 5:43:59 PM3/24/09
to cufón
Fantastic, thanks for looking at it!

Simo Kinnunen

unread,
Mar 26, 2009, 4:46:09 PM3/26/09
to cu...@googlegroups.com
Hi Tom,

JAWS and the OS X VoiceOver are now supported, I tested them both. I
assume other similar programs will work as well.

Simo

On Mar 24, 2009, at 11:47 AM, Tom Adams wrote:

>

Tom Adams

unread,
Mar 27, 2009, 5:56:56 AM3/27/09
to cu...@googlegroups.com
Brilliant, thanks Simo for making the change!

Tom
--
tom adams is a web designer.
find him hiding at www.sonofswiss.co.uk
Reply all
Reply to author
Forward
0 new messages