RE: empty alt tags

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> Hello,
> Can anyone tell me the purpose for using empty alt tags for
> unessential images like spacer gifs?
> 
> In researching accessible web design, I came across this 
> recommendation but
> could not find an explaination for it.

Firstly all HTML attributes are one of three types:
1. Those which have a default value (e.g. the default colspan value
is 1, so there is no need to type <td colspan="1">)
2. Those for which the value can be guessed from context and browser
defaults if it is absent, and
3. Those for which there is no reasonable way for the browser to
guess the correct value, and which must therefore always be given,
such as the src and alt attributes of the <img> element.

As such leaving out alt attributes isn't  just bad from the point of
view of accessibility, it isn't correct HTML.

As far as accessibility goes I've just said that HTML requires the
attribute because there is no good way of guessing it's value. When a
browser *does* come across such an image it has two choices, it can
either assume alt="" which could lead to an important (if badly
marked-up) part of the document being ignored, or it can render it as
something like [image], the filename, or a similar way of indicating
the image's presence.

The latter is what many non-graphical browsers opt for. It has
advantages in that it quickly identifies errors, and a page full of
[image][image][image] is less confusing for the user than a blank
page, as at least they can tell what went wrong.

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBO3rPEIFpv9f1Mr0YEQJ3pwCfcZWohBdzPnaPsc/ZcnPO5jjMW2AAoLH1
ya0ejVsdDfXjKy3iS0bRhkGM
=1ueq
-----END PGP SIGNATURE-----

Received on Wednesday, 15 August 2001 15:34:45 UTC