WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: select/option coding question


From: Jukka K. Korpela
Date: Mar 17, 2004 2:08PM

On Wed, 17 Mar 2004, Kharmen Roman wrote:

> I am using a dropdown box that requires an onChange(),
> for presentation -- no use of a submit button.

This is impossible to judge without knowing what it really relates to and
what the functionality is. But a form control that works via client-side
scripting only is always an accessibility problem.

> However,
> the following code is failing when I validate my page
> using AccVerify.

Well, what does it actually say?

> Failing for N. 508 Standards, Section 1194.22, (n)

If it only says that, it's fairly useless. I'm afraid most accessibility
checkers spit out nonsense when faced with scripts. They just see some
scripting, then say no-no, and make a false reference to a requirement -
without even trying to check whether the requirement is actually violated.

> <SELECT class="myClass" id="status" name="isActive"
> onchange="procName(param1,param2)">
> <OPTION selected value="target1">Active</OPTION>
> <OPTION value="target2">Inactive</OPTION>
> <OPTION value="target3">All</OPTION>

If this is non-essential functionality that the use can well live without,
make it JavaScript-generated code so that won't disturb the user (with a
non-working widget) when JavaScript is off.

If it it essential functionality, try and construct a server-side script
with the same functionality, put the select element inside a form, and add
a submit button (inside <noscript> if desired, but this is debatable).
If this is not possible, add a <noscript> element that explains what
service is unavailable and how get some replacement some other way (e.g.,
a phone number) - this won't actually make the page accessible, but it
makes it less inaccessible.

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

To subscribe, unsubscribe, suspend, or view list archives,
visit http://www.webaim.org/discussion/