The thinking, that such a little thing like a alt tag doesn't matter, is wrong in my eyes. If you want to write a HTML page, you has to write correct HTML/CSS code as far as possible - regardless of the project size. And the right syntax for including a Image into a HTML page is free available for every Webdesigner:
Code:
CODE HTML 4.01
<!-- To avoid problems with text-only UAs as well as
to make image content understandable and navigable
to users of non-visual 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 %URI; #REQUIRED -- URI of image to embed --
alt %Text; #REQUIRED -- short description --
longdesc %URI; #IMPLIED -- link to long description
(complements alt) --
name CDATA #IMPLIED -- name of image for scripting --
height %Length; #IMPLIED -- override height --
width %Length; #IMPLIED -- override width --
usemap %URI; #IMPLIED -- use client-side image map --
ismap (ismap) #IMPLIED -- use server-side image map --
source: http://www.w3.org/TR/html401/struct/objects.html#h-13.2
Code:
or with XHTML 1.0:
<!--
To avoid accessibility problems for people who aren't
able to see the image, you should provide a text
description using the alt and longdesc attributes.
In addition, avoid the use of server-side image maps.
-->
<!ELEMENT img EMPTY>
<!ATTLIST img
%attrs;
src %URI; #REQUIRED
alt %Text; #REQUIRED
name NMTOKEN #IMPLIED
longdesc %URI; #IMPLIED
height %Length; #IMPLIED
width %Length; #IMPLIED
usemap %URI; #IMPLIED
ismap (ismap) #IMPLIED
align %ImgAlign; #IMPLIED
border %Length; #IMPLIED
hspace %Pixels; #IMPLIED
vspace %Pixels; #IMPLIED
>
source: http://www.w3.org/TR/xhtml1/
For those who choose to question, what the word "REQUIRED" behind the two Attributes src and alt means, the W3C was so clever to make a clear and easy definition:
The term "REQUIRED" mean that the definition is an absolute requirement of the specification.
Both attributes "src" and "alt" are a MUST for each <img> tag. In other words: All the other attributes are optional, but not the attributes "src" and "alt".
There are additional rules available, what you should do with decorative images (alt="") and that you should use the alternative text (alt attribute) for short text and that you can use an additional but optional longdesc attribute and the optional title attribute. I've posted a lot of links here, if you want to go further into this topic.
If you starts a HTML validator service and it says to you, your code is wrong, you should be able to look into the HTML syntax and repair your errors. It's really so easy to do. You need more time to read this thread and argument against it, instead of doing quick and easy your bug fixing.
Wrong attributes, wrong syntax of attributes and a wrong closing table tag (as I found recently in a HTML code) are in no case "false bugs". Those are syntax errors and the Webdesigner can be glad, that the customer does not know what invalid HTML code he received for his money.
Beside producing Web applications and Websites, my customers also often engage me as consultant, in order to help them with large Web projects (projectmanagement, inspection of code, security check, acceptance, you know the stuff...). Whenever I receive such a code from a supplier, I give it back to him with the words "Sorry, we can't accept that". Each customer is wise to do the same, until the HTML code is free from errors.
Remi
Bookmarks