- From: Kynn Bartlett <kynn-hwg@idyllmtn.com>
- Date: Thu, 23 Jul 1998 13:54:24 -0700
- To: Kristine Bradow <kbradow@ece.eng.wayne.edu>
- Cc: "w3c-wai-ig@w3.org" <w3c-wai-ig@w3.org>, David Sant <sdavid@ece.eng.wayne.edu>
At 04:27 p.m. 07/23/98 +0100, Kristine Bradow wrote: >I'm a bit of a web design novice, and I want to implement a counter on >my lab's web page. I've been rudely surprised by all that is involved in >creating counters in the first place--PERL nightmares on top of the >HTML. Plus, I've been doing my best to follow the W3C accessibility >guidelines to keep the page accessible, so I was wondering if anyone had >any tips on creating "accessible counters," or is there is any such >thing as an "accessible counter." Do they typically cause problems? >Especially with the scripting involved? Well, the model for most web counters is to provide an image or a series of images, e.g. one reading "03424" or several that read "0" "3" "4" "2" "4". For these types of counters, you just have to make sure that you are providing ALT text for each one. This means your script has to provide the correct numbers. Many "free" or third-party counters use graphics that aren't even hosted on your machine; this leads to problems because they are unable to change the HTML tags in your page, and can only provide a graphic. E.g.: <IMG SRC="http://www.kynn.com/cgi-bin/counter?id=654"> people have seen this page. In this case, the source of the image would be a CGI script on my computer, and it would use the id of 654, which would be a code I would assign to your page. My CGI script would know how many times id 654 has been accessed, and it would create a graphic showing that number. However, my CGI script has no access to the ALT attribute (which was not included in your HTML above); even if we used a value, we couldn't provide the actual numbers. So we can use something like ALT="Many" -- but that still presents access problems, since non-graphical users can't get the same information made available to those with graphical browsers. Image-based counters are an annoying barrier to accessibility. If you can run the scripts locally on your machine, and call them via Server Side Includes or the like, you have a lot more control over what is returned. Instead of something like this: <IMG SRC="/graphics/counter/0.gif"> <IMG SRC="/graphics/counter/4.gif"> <IMG SRC="/graphics/counter/5.gif"> ...you can just have the script add ALT text appropriately. Two ways to this are: <IMG SRC="/graphics/counter/0.gif" ALT="0"> <IMG SRC="/graphics/counter/4.gif" ALT="4"> <IMG SRC="/graphics/counter/5.gif" ALT="5"> or <IMG SRC="/graphics/counter/0.gif" ALT="045"> <IMG SRC="/graphics/counter/4.gif" ALT=""> <IMG SRC="/graphics/counter/5.gif" ALT=""> The specifics on how to do this with your chosen CGI programming language are left as an exercise for the coder. <RANT TITLE="About Counters"> Now, regardless of the issue of counters and accessibility, I have a few more words about counters in general: Don't use counters. Counters produce nothing useful for your web page, have no value whatsoever to the visitors, increase the system load, increase the download time, and as we've seen before, many have serious accessibility flaws. In addition, counters (like link exchange banners) are a sure sign of a new and in- experienced web designer, or at least, someone who hasn't thought out very carefully what they're doing. They're even less acceptable on "professionally"-done web sites. Now, if you want to get information on how many times your page is accessed, you should be able to get this from the server logs. If you don't have access to those, request it from your sysadmin or webmaster. Server logs, especially when run through a good analysis program (I like "analog"), can provide so much more useful information than a counter can, and it doesn't decrease the usability or esthetics of your web page. </RANT> -- Kynn Bartlett <kynn@hwg.org> Vice President, Marketing and Outreach, HTML Writers Guild http://www.hwg.org
Received on Thursday, 23 July 1998 16:45:32 UTC