Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

tlug: IMG ALT tags



Hi all,

On 22-Oct-98 Scott Stone wrote:
> On Thu, 22 Oct 1998, Jonathan Byrne - 3Web wrote: 
>> On Thu, 22 Oct 1998, Darren Cook wrote:
>> >If the image is decorative, it doesn't deserve an ALT tag, IMHO. It's just
>> >a waste of bandwidth. The HTML standard doesn't specify it as required.
>> 
>> I don't often say RTFM, but I will here.  The alt attribute is most
>> definitely mandatory.  Correct procedure if you really want nothing in it is
>> to make it empty.
> 
> mandatory by what standard?  Even arena, W3C's own browser, doesn't have
> trouble with images that have no alt= tag.

I keep a local copy of HTML 4.0wd on my hard drive:

From: html4.0wd/struct/includes.html#h-7.7.2

--------------------------------------------------------------------
Including an image: the IMG element 

<!-- To avoid problems with text-only UAs you need to provide
     a description with ALT, and avoid server-side image maps -->
<!ELEMENT IMG - O EMPTY      --  Embedded image -->
<!ATTLIST IMG
  %attrs;                          -- %coreattrs, %i18n, %events --
  src         %URL       #REQUIRED -- URL of image to embed --
  alt         CDATA      #IMPLIED  -- description for text only browsers --
-------------------------------------------------------------------


Well, that seems to suggest that it's recommended. But wait:

From: html4.0wd/struct/includes.html#adef-alt

--------------------------------------------------------------------
alt = cdata 
    For user agents that cannot display images, forms, or applets, this
    attribute specifies alternate text. The
    language of the alternate text is specified by the lang attribute. 

Several non-textual elements (IMG, AREA, APPLET, and INPUT) allow authors to
specify alternate text to serve as content when the element cannot be rendered
normally. Specifying alternate text assists users without graphic display
terminals, users whose browsers don't support forms, visually impaired users,
those who use speech synthesizers, those who have configured their graphical
user agents not to display images, etc. 

While alternate text may be very helpful, it must be handled with care. Authors
should observe the following guidelines: 

    Do not specify meaningless alternate text when including images intended to
    format a page. In this case,
    the alternate text should be the empty string (""). In any case, authors
    should not use images to format pages; style sheets should be used instead. 
    Do not specify meaningless alternate text (e.g., "dummy text"). Not only
    will this frustrate users, it will slow down user agents that must convert
    text to speech or braille output. 

The alt attribute is mandatory for the AREA element, but optional for IMG,
APPLET, and INPUT. 
-------------------------------------------------------------------------

Maybe I need glasses, but the WD stated that ALT tags are a *good_thing*
_should be used_ and if you aren't going to use them, you should use an empty
string ("")

Now can we get back to talking about Linux....

Regards,

Jim S.
---------------------------------------------------------------
Next Nomikai: 20 November, 19:30 Tengu TokyoEkiMae 03-3275-3691
Next Meeting: 12 December, 12:30 Tokyo Station Yaesu central gate
---------------------------------------------------------------
Sponsor: PHT, makers of TurboLinux http://www.pht.co.jp


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links