WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: accessibility of a search-form

for

From: Christian Heilmann
Date: May 2, 2005 1:59AM


>I am in doubt about the accessibiltiy of our new implemented website-search. even if our contractor affirms it, I would be pleased to hear your opinion.
>>
>> to make the searchscript also produce search results where the search-pattern is only a part of the search finding (e.g. access in accessibility), we would have to use wildcards (*access*). To spare the user to input the wildcards, they should be used automatically. It seems that an appropriate change in the search-script itself would have been to complex, so our contractor implemented a javascript which is putting the "*" around the search-pattern when clicking the form-button.
>>
>> It woul be nice, if your could have a look at our website and tell me your opinion. Our website is in german, but the search-form in the navigational menu ist easy to spot (it is the only form on the page ;-) .
>>
>> http://www.linz.at


The bad mistake is that you use an onclick handler on the button
rather than an "onsubmit" on the form itself. In any case though if
your search engine _requires_ the wild cards, then you shouldn't apply
them via JavaScript anyways but change the search engine script
instead.

This is a typical case of fixing a symptom, and not the cause. You
_can_ use JavaScript to add the asterisks on submit of the form, and
explain to non-JavaScript users that they need to add the asterisks
for wildcard search, but that is sharing your inability to solve a
technical problem (changing the search script) with the user rather
than helping him.

Maybe you'll want to only find "stadt" and not "stadtverwaltung". A
label stating "Add * for wider searches, for example *mei* will find
"meisterbrief" and "buergermeister".

To de-confuse:

1) onclick on button bad - whatever you do
2) The wildcards are a feature, not a neccessity
3) Ideally, you should change the script, not the frontend talking to
it to add the wildcards automatically _and_ offer a "find only this"
checkbox.

HTH
Chris


-- Chris Heilmann
Blog: http://www.wait-till-i.com
Writing: http://icant.co.uk/
Binaries: http://www.onlinetools.org/