E-mail List Archives

Re: Inactive Buttons - ALT Tags?

for

From: Jukka K. Korpela
Date: Dec 22, 2005 3:00AM


On Thu, 22 Dec 2005, <EMAIL REMOVED> wrote:

> I have a situation where a button is inactive until something is selected on
> the page.

Then the main question is: how does the page work when scripting is
disabled?

Inactive buttons should only appear as generated by client-side scripting,
so that they will not be present at all when scripting is off, i.e. when
there is no way to make them active. Consequently, you could and normally
should delay the generation of such buttons so there are no inactive
buttons.

> Visually, it has two different colors (in an inactive state, the
> button is grey; when active, it's beige).

Is the user expected to understand such symbolic use of colors?
Even when he is colorblind, or blind?

> What's the best way to handle ALT
> tags for the two different states?

What "ALT tags"? There are no such tags. And ALT _attributes_ are to be
used in some elements only, and you have given no hint of using such
elements. If you gave the URL, we could perhaps see what you really mean.
Do you mean "button-like image" when you write "button"? That's a yet
another problem, and not just a matter of using ALT attributes.
To begin with, text in an image cannot be enlargened or changed to a more
readable font. (Some browsers allow zooming in general, but IE doesn't.)

> Or another possibility?

Try starting from the original problem, not the problems you have created
in an attempt to deal with some unspecified situation.

If this is about a submit button, then it should be a normal submit
button, period. Stop using an image submit button, and many problems
vanish in a puff of logic.

If you want to make a submit button disabled until some fields have been
filled, the only accessible and reasonable approach is to generate it in
JavaScript, naturally with
<noscript><input type="submit" ...></noscript>
In the JavaScript-generated content, you could have a text saying that you
need to fill out the required fields before you are able to submit the
form data, then replace this by submit button.

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