Re: SCR30: Script for Expanding Link Text

On Tue, Sep 1, 2009 at 2:07 PM, <makoto.ueki@gmail.com> wrote:

>
> Name: Makoto Ueki
> Email: makoto.ueki@gmail.com
> Affiliation: Infoaxia, Inc.
> Document: TD
> Item Number: SCR30
> Part of Item: Examples
> Comment Type: technical
> Summary of Issue: SCR30: Script for Expanding Link Text
> Comment (Including rationale for any proposed change):
> This script repeats expanding link text when clicking over and over.
>
> Proposed Change:
> Adding "links[link].className="expand" + cn;" to scripts would fix this
> issue.
>
>
>
> Modify scripts as following:
>
>
>
> <script type="text/javascript">
>
> <!--
>
> var linkContext = {
>
>   "hist":" version of The History of the Web",
>
>   "cook":" version of Cooking for Nerds"
>
>
>
> };
>
>
>
> function doExpand() {
>
>        var links = document.links;
>
>        var link;
>
>
>
>
>
>        for (link in links) {
>
>                var cn = links[link].className;
>
>                if (linkContext[cn] ) {
>
>
>  links[link].appendChild(document.createTextNode(linkContext[cn]));
>
>                }
>
>                links[link].className="expand" + cn;
>
>        }
>
> }
>
> -->
>
> </script>
>
>
================================
Response from the Working Group
================================
Thank you for catching this. We received a similar comment about this
earlier this year and will be including some changes to this example in the
next update of the techniques documents.

Loretta Guarino Reid, WCAG WG Co-Chair
Gregg Vanderheiden, WCAG WG Co-Chair
Michael Cooper, WCAG WG Staff Contact


On behalf of the WCAG Working Group

Received on Friday, 20 November 2009 22:49:34 UTC