Techniques for WCAG 2.0

Skip to Content (Press Enter)


SCR36: Providing a mechanism to allow users to display moving, scrolling, or auto-updating text in a static window or area


Any technology that moves, blinks, or updates text and can create a static block of text.

This technique relates to:


Some Web pages display scrolling text because there is limited space available. Scrolling the text in a small text window makes the content available for users who can read quickly enough, but causes problems for users who read more slowly or use assistive technology. This technique provides a mechanism to stop the movement and make the entire block of text available statically. The text may be made available in a separate window or in a (larger) section of the page. Users can then read the text at their own speed.

This technique does not apply when the text that is moving can not be displayed all at once on the screen (e.g., a long chat conversation).

Note: This technique can be used in combination with a style switching technique to present a page that is a conforming alternate version for non-conforming content. Refer to C29: Using a style switcher to provide a conforming alternate version (CSS) and Understanding Conforming Alternate Versions for more information.


Example 1: Expanding Scrolling Text in Place

A large block of text is scrolled through a small marquee area of the page. A button lets the user stop the scrolling and display the entire block of text.

Note: This code example requires that both CSS and JavaScript be turned on and available.

The CSS component:

Example Code:

#scrollContainer {
        visibility: visible;
        overflow: hidden;
        top: 50px; left: 10px;
        background-color: darkblue;
      .scrolling {
        position: absolute;
        width: 200px;
        height: 50px;
      .notscrolling {
        width: 500px;
      #scrollingText {
        top: 0px;
        color: white;
      .scrolling #scrollingText {
        position: absolute;

The script and HTML content:

Example Code:

<script type="text/javascript">

      var tid;
      function init() {
        var st = document.getElementById('scrollingText'); = '0px';
      function initScrolling () {
        tid = setInterval('scrollText()', 300);
      function scrollText () {
        var st = document.getElementById('scrollingText');
        if (parseInt( > (st.offsetHeight*(-1) + 8)) {
 = (parseInt( - 5) + 'px';
        } else {
          var sc = document.getElementById('scrollContainer');
 = parseInt(sc.offsetHeight) + 8 + 'px';
      function toggle() {
        var scr = document.getElementById('scrollContainer');
        if (scr.className == 'scrolling') {
          scr.className = 'notscrolling';
        } else {
          scr.className = 'scrolling';
  <input type="button" id="scrollButton" value="Expand" onclick="toggle()" />
  <div id="scrollContainer" class="scrolling">
    <div id="scrollingText" class="on">
    .... Text to be scrolled ...

Here is a working example of this code: Expanding Scrolling Text in Place.


No tests available for this technique.