Re: Feedback concerning validator.w3.org - ALT tag

On Fri, 13 May 2005 04:49:01 +0100
"Clitheroe Kid" <clitheroekid@hotmail.com> wrote:

> I wish to offer the following comments about the validation of HTML
> 4.01 Transitional pages.

I think you are actually commenting on HTML as a language, rather than
the validation of it. Bear in mind that the two are entirely separate
things. 

> With respect, one important consideration in the design of web pages
> is reducing the size of the pages by the elimination of unnecessary
> code, with a view to the pages loading more quickly.

Sounds good.

> To this end, I generally omit any code which has no practical value.
> That is to say, any code which, if omitted, will not break the page,
> either in IE or in Netscape.

Doesn't sound so good. There is a whole world out there beyond IE and
"Netscape". (How many people use Netscape, as opposed to Mozilla
variants, these days anyway?) In addition, I suspect your interpretation
of "break" is somewhat limited - you seem to mean "break" in a visual,
aesthetic sense which is only one context in which a page might be used.

> One matter which always irritates me when submitting a page for
> validation at http://validator.w3.org is the page being failed, even
> when designed as Transitional rather than Strict, for the omission of
> "Alt" tags.

Then you need to be irritated at the HTML working group, not the
validator people. The validator is just doing what the specification
says. If the validator went down the road of saying "well, we'll
ignore this bit of the HTML spec, and that bit" then it would render
validation meaningless!

> An "Alt" tag 

attribute

> often serves no useful purpose, because an image is frequently
> inserted on the page as a spacer, or to fulfill some other design
> purpose, rather than as a picture to be viewed. Adding empty "Alt"
> tags to force the page to validate is a sheer waste of the designer's
> time, of server diskspace, and of downloading time.

Ignoring for a second the trivial amount of extra "diskspace" or
"downloading time" that alt="" takes (though I agree wholeheartedly
with the principle of keeping filesize down), you have just illustrated
the problem with your "practical" approach; you are making assumptions
which aren't correct. The following two examples are rendered ENTIRELY
differently in some browsers (outside your artificially constrained
bubble of IE/ Netscape):

<img src="foo">

<img src="foo" alt="">

> Omitting an "Alt" tag will not cause any adverse effect on the page's
> appearance, in any browser. 

You are provably wrong on that. I'll send you a screenshot if you
don't believe me. (Even if it didn't have an impact on visual
appearance, you are still missing the point that it is communicating
information, which might affect how the page is rendered, for example,
in non-visual media.)

> The tag has no design function, only an information function.

Quite. And alt="" has a specific informational meaning, distinct from
the case of no alt attribute. Specifying "there is no alternative text"
is providing information in itself.

I think what you're getting at is that you'd like an empty ALT
attribute to be equivalent to having no ALT attribute at all, and I can
see the argument for it. However the fact is that it's not according
to the spec, and given the poor use of ALT in many cases, it's probably
actually quite handy (pragmatically) to be able to distinguish between
a page where someone just can't be bothered to add ALT attributes, and
one where the author explicitly specifies that the alternative content
is null (empty) - for example in the case of a graphic used purely for
aesthetic purposes, as you described.

> A page should not be failed for something which has no repercussions
> on the layout of that page,

The W3C validator is not a "layout validator" (not that HTML is a
layout tool anyway) nor a quality assurance tool; it
validates against the HTML spec (or a subset thereof). That's quite a
specific and narrow goal. It can't pick and choose which bits of the
HTML spec to apply, or that would render it meaningless. Either your
page matches the spec, or it doesn't.

> HTML elements

and attributes, presumably? (N.B. "tag", "element" and "attribute" all
mean different things)

> which are purely optional, such as "Alt" tags, should be
> removed from the category of objects which fail in a Transitional
> doctype. They should only be taken into account (if at all) with the
> Strict doctype.

You need to go and speak to the HTML Working Group, though I suspect
your chances of getting the HTML 4 Transitional DTD changed at this
stage are negligible.


Tim

Received on Sunday, 15 May 2005 11:43:45 UTC