WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: help with a form please

for

From: Jukka K. Korpela
Date: Mar 17, 2007 4:40AM


On Sat, 17 Mar 2007, Geoff Munn wrote:

> There is no width and height attributes on your <img> element here,
> which might be a problem for any accessibility guidelines you have to
> conform to.

No, width and height attributes (or corresponding CSS properties) are an
efficiency issue rather than an accessibility matter. Adding them does not
make the page any more accessible. Neither are they required or
recommended by accessibility guidelines.

In fact, they may _reduce_ accessibility. The most popular browser uses
the specified dimensions when rendering the alt text visually, in
situations where the image is not rendered. Setting pixel dimensions for
text is a potential threat, since it may result in truncation of the alt
text when it does not fit. This may happen even when the alt text is
short. After all, the user may have set his system to use a large font
in such texts (it's really a system-wide setting on Windows).

This IE behavior can be turned off, but few people ever heard of that.

> Secondly, you do not have a default value for your <input> element.
>>
>> <td><INPUT size="25" name="icand_fname" ID="icand_fname"></td>
>> <td><INPUT size="25" name="icand_lname" ID="icand_lname"></td>

Neither should there be. The old recommendation of setting dummy
placeholders as initial content was ill-advised from the beginning, and it
was made with the condition "until user agents handle empty fields
properly". The faulty browsers that didn't cope with empty fields
have lost all their significance years ago. Anyone using such a
browser these days is doomed to encounter serious difficulties in
the great majority of forms on web pages.

Following the old recommendation by foolish dummy values like VALUE="your
first name" is not only pointless; it is hostile to accessibility (e.g.,
by confusing people with cognitive problems into thinking that the field
has already been filled).

> There is no 'type' attribute for these <input> elements... I presume
> you mean 'text'. If so, there is also no default value.

There definitely is a defined default value for the type attribute in
<input> elements, and has always been ever since <input> was introduced
into HTML. The default type="text" need not be written explicitly, and it
usually isn't.

The only reason for using it is that it makes it easier to use attribute
selectors in CSS, since a selector like input[type="text"] matches
(somewhat debatably) only those <input> elements that have the attribute
value specified explicitly. But this is not an accessibility issue at all,
and it's irrelevant to most authors.

> I might be a little harsh, but there you go...

You would deserve some harsh comments for disseminating completely wrong
information, but there was nothing harsh in your style. You were just
utterly wrong and wanted to give advice before actually getting enough
advice from existing material on accessibility and web authoring.

--
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/