Welcome!

ColdFusion Authors: Maureen O'Gara, Hovhannes Avoyan, Yakov Fain, Pat Romanski, Liz McMillan

Related Topics: ColdFusion

ColdFusion: Article

ColdFusion and Section 508

ColdFusion and Section 508

There's a new federal law, known as Section 508, that requires disabled accessibility to government Web sites.

We'll explain what you have to do to comply, how ColdFusion can help (or hinder), and why 508 isn't a bad thing after all.

Imagine
Imagine you can't see and you have a friend read you the HTML source for a Web page over the phone so you can understand the site. That's what viewing a site with a screen reader is like. Imagine minutes of hearing header HTML code for navigation - with cryptic image filenames and no English description. Imagine complex table layouts with no clue as to what each number means. Imagine applets that you don't know anything about because there's no HTML source for them.

Welcome to the world of blind Web users. Section 508 is aimed at making it easier for them to read your Web pages.

Section 508 Basics
As many programmers for the federal government already know, there are new standards for Web page accessibility. Currently these standards are mandatory for all federally sponsored sites, but who knows when the law might be extended to all sites, as ADA (Americans with Disabilities Act) was extended to all businesses. We suggest you check out disabled accessibility and get the benefits of better Web design now. Dealing with accessibility gets you thinking out of the box. For instance, can your page function without a mouse? Plus you'll reap the benefits of targeting your site to cell phone browsers, as similar issues apply.

Section 508 ensures that the disabled can access the same public information as everyone else. In the last census 54 million Americans had some disability, including 10 million blind or visually impaired. People with disabilities use tools such as screen and Braille readers. Think of their tools as alternative browsers. Just as you must consider differences between Internet Explorer and Netscape, these browsers must be considered when you code.

Section 508 is hot - both Macromedia and Microsoft have Web pages listing their 508 compliance initiatives, and Macromedia has released an extension to Dreamweaver with accessibility tools. Designing for maximum access to Web content is spreading to education, local governments, and corporations.

The Regulations
Some of the requirements are listed in Table 1 (for a full review, visit www.access-board.gov/sec508/guide/1194.22.htm).

ColdFusion presents solutions to help you comply, and also presents some problems for you to overcome.

Help from ColdFusion
How can ColdFusion assist you? Let's look at an example of how to comply with Rule A: "A text equivalent for every nontext element shall be provided...via alt."

If you're displaying a record with an associated image (perhaps the description of a house with a photo), list the image path and image description as fields in the record, and then output the image as part of the dynamic data (see Listing 1).

Data Tables
A common ColdFusion programming technique is to build dynamic tables from record sets. Good news! You can build dynamic tables that are Section 508-compliant and populated with records from a CFQUERY using the ID and HEADER tags. Say you wish to query a data source containing information about your CD collection, with the records displayed in a table listing artist and CD title (see Listing 2). A screen reader would speak the following: "CD Collection. This table lists the artists and titles of my music collection. Artist, Title..." and then would speak the contents of each cell.

Things to Watch Out For
ColdFusion is an excellent tool for creating compliant Web pages. However, there are some things you should consider. CFFORM, CFINPUT, CFSELECT, and other JavaScript-producing tags can't control placement of the <NOSCRIPT> tag. You'll need to browse your pages and look at the source code produced to determine placement of this tag. (Macromedia is aware of this issue and will address it in the future.) Another consideration is the use of CFINCLUDE. If the included template is used solely as an inserted page component, strip the file of all <HTML>, <HEAD>, and <TITLE> opening and closing tags. Otherwise, pages may confuse screen readers with extra opening and closing tags.

Other problem tags that use Java applets include:

  • CFGRID
  • CFTREE
  • CFSLIDER
To be compliant you'll need to provide the data in these tags in a separate format such as HTML tables or lists. For example, for CFGRID you can provide a table of input boxes with names made unique by adding the row number to them (see Listing 3).

In the action page we can again loop over the rows, ignoring any blank ones (see Listing 4).

Timeout
Do you have members-only login sections on your site? Then you may have timeout issues. Session variables, by default, last only 20 minutes. That may not be long enough for disabled users to view the material. We suggest that you code the timeout and increase the session timeout to an hour or more. Then you can let individual users increase the timeout for themselves.

Positive Effects of Compliance
By adapting coding practices required by the guidelines for accessibility, you'll be in a win-win situation. First, your disabled visitors are winners because they'll be able to access your site. Second, your code will be streamlined and clean, so it will download fast on dial-up connections and will be easier to use from PDAs too.

Summary
In this article we've introduced you to accessibility issues and new Section 508 requirements for federal Web sites and showed how ColdFusion's flexibility makes it your ally for compliance. An accessible Web site is a well-designed site.

Resources

  • www.w3.orgW3
  • Popular Bobby checker for examining pages for accessibility: www.cast.org/bobby
  • Federal Section 508 - a ColdFusion site: www.section508.gov/
  • Henter-Joyce, makers of the JAWS screen reader: www.hj.com
  • HiSoftware, producers of verification tools: www.hisoftware.com
  • W3 accessibility guidelines: www.w3.org/TR/WCAG10-TECHS
  • DIBOC, an organization with some excellent examples: www.diboc.com/
  • Tools download page: www.macromedia.com/macromedia/accessibility/
  • More Stories By Michael Smith

    Michael Smith is president of TeraTech (www.teratech.com/), an
    11-year-old Rockville, Maryland-based consulting company that
    specializes in ColdFusion, database, and Visual Basic development.

    More Stories By Jon Brundage

    Jon Brundage is a government consultant, ColdFusion programmer,
    and an MDCFUG speaker and author.

    Comments (4) View Comments

    Share your thoughts on this story.

    Add your comment
    You must be signed in to add a comment. Sign-in | Register

    In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


    Most Recent Comments
    Michael Smith 03/19/02 04:58:00 PM EST

    Jeff
    Thanks for writing! You are correct these pop ups are not 508 complaint -
    first many screen readers will not read any pop-ups at all and second as
    you point out images should have alt tags explaining their content in
    text form. My only defense is that I proofed a PDF version of the article
    for the print magazine and didn't think to proof the online version too.
    :-( Mea Culpa.
    - Michael

    Michael Smith 03/19/02 04:57:00 PM EST

    Jeff
    Thanks for writing! You are correct these pop ups are not 508 complaint -
    first many screen readers will not read any pop-ups at all and second as
    you point out images should have alt tags explaining their content in
    text form. My only defense is that I proofed a PDF version of the article
    for the print magazine and didn't think to proof the online version too.
    :-( Mea Culpa.
    - Michael

    Ann Ashby 03/18/02 10:45:00 AM EST

    Excellent article! Very easy to understand.

    jeff trudell 03/15/02 03:34:00 PM EST

    Your article includes images that contradict your message, i.e., figures 1 and 2, http://www.sys-con.com/coldfusion/archives2/0403/smith/tbl1 and tbl2.jpgs; they are writings presented exclusively as image files, launched in java pop-up windows, without alt text descriptions. Did you forget to include in the article "here is an example of exactly what not to do to alienate visitors who are sight challenged"? I look foward to hearing anything from you, your editor, or your profreader [sic.] that might restore your credibility on this issue.