Developer Checklist — JavaScript Appendices

Correct code

JS_C_A6: Use scripting to scroll content and provide a mechanism to pause it and JS_C_A7: Use scripting to create an alternative, static version of scrolling content

This example shows a scrolling news-ticker, with two control mechanisms:

These mechanisms are essential for people with low-vision, or who have a cognitive disability, and consequently find it difficult or impossible to read animated text. It's also beneficial for people with a motor impairment, who may find it more difficult to interact with content which is moving.

Live Demo

Use the buttons above the ticker to pause and resume scrolling, or to expand the ticker into a static list of links:

  1. [17:40] Six Italian scientists and an ex-government official have been sentenced to six years in prison over the deadly 2009 earthquake in L'Aquila.
  2. [16:59] Security guards prevent a man wielding a knife from attacking Finnish Prime Minister Jyrki Katainen during a local election campaign, officials say.
  3. [14:08] Lebanon's army urges political leaders to be careful when expressing views, in a bid to halt rising tensions after the killing of a senior security official.
  4. [13:25] Lance Armstrong is stripped of his seven Tour de France titles by cycling's governing body the UCI

JavaScript Code

The JavaScript code for this example can be found in: JS_C_A6-A7.js

The CSS for this example can be found in: JS_C_A6-A7.css