Tutorial: Accessible JavaScript scroller
Last revision: 13th April 2005
A change to my main style sheet has indicated a problem with the method. If a font-size, other than 100%, is stated in the body tag then the scroller fails to inherit the font-size correctly. Visually this causes to the scroller to restart early. However if the font-size is not set in the body tag the code works as outlined. Thanks to Sascha Ebach for catching this one.
An accessible horizontal text scroller or ticker
A vertical text scroller is now under development
Developed on request for Trenton from Webcredible
Ever needed a horizontal text scroller but couldn't use one for accessibility reasons? This scroller is, as far as I'm aware, completely accessible.
Ever needed a horizontal text scroller but couldn't use one for accessibility reasons? This scroller is, as far as I'm aware, completely accessible.
It comes with a dynamically generated start / stop and a show all button. It also changes font-size as the user changes their preferences.
Conditions tested:
- JavaScript off, CSS on
- Scroller stationery
- Displays all the text
- Keeps width and extends height
- No controls displayed
- JavaScript off, CSS off
- Scroller stationery
- Displays all the text
- Natural width and height
- No controls displayed
- JavaScript on, CSS off
- Scroller moves
- Displays all the text
- Natural width and height
- Controls displayed and work
- Horizontal scrollbar appears
- JavaScript on, CSS unsupported
- Unknown
Browsers and platforms tested:
- Windows 2000:
- Opera v7.11
- Mozilla v1.4
- Internet Explorer v3 (degrades well)
- Internet Explorer v4 (degrades well)
- Internet Explorer v5.01 - (nowrap fails I'll add a <nobr> if this is an issue)
- Internet Explorer v5.5
- Internet Explorer v6.02
- Netscape v2.0 (degrades well)
- Netscape v4.7 (degrades well)
- Netscape v6.2
- Netscape v7.0
- Macintosh OSX:
- Netscape v7.0
- Mozilla v1.4?
- Safari v1
- Opera v6
Download the demo files:
If you choose to use this scroller I would be appreciate an email stating on which site it was used (so I can link it as an example). It also would be nice to have a link back but it's not expected.
Version 4. The complete set of files for the Accessible Scroller in a zip file [2.85KB].
Download a free zip reader. Though the file should be readable as a compressed folder in Windows without downloading the reader.
