Home Messages Index
[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index

Re: xhtml - accesskey for select not allowed?

Roy Schestowitz <newsgroups@xxxxxxxxxxxxxxx> writes:
> __/ [Jukka K. Korpela] on Sunday 11 December 2005 11:11 \__
> > Wrong approach. Country selection should _not_ be made with a dropdown,
> > unless you have just a handful of countries. Use a text input field, and
> >   accept both country names and standard abbreviations.
> 
> I must say that I disagree. Most folk are unaware of standard abbreviations.
> Moreover, too much freedom as in an open string leaves room for ambiguity,
> frustration and requires programming that provides a level of tolerance. The
> whole thing can be hard to maintain. Even if you list all countries in the
> world, the size of the form would not become far larger, maybe just 5 KB
> (uncompressed).

Hmm. I have a list of countries that is almost exactly
5KB. Unfortunately there's then an extra 7KB overhead from all the
<option> and </option> tags.

More importantly it's harder to use - many countries have multiple
overlapping names that could reasonably used in such a form (consider
England/United Kingdom/Great Britain) - do you include all of them, or
only one, etc. Additionally a 400-long <select> input is difficult to
use even if you know what you're looking for (harder with the mouse
than the keyboard).

With Burma/Myanmar, for example, the choice over which form to use (or
both) has capacity to offend people. Hide it behind a plain text
<input> and silently accept both behind the scenes, and no-one takes
offence.

My preferred solution is not to include a country field at all - just
have a <textarea> address field and leave it at that. In the case
where some other piece of software needs the country explicitly
identified, our solution is to:
1) use <input type="text" ...>

2) if it's not in the list of allowed countries when the form is
submitted, return an error

3) When returning the error and giving the user another go at the
form, we give an option to immediately select the five countries a
combination of soundex and levenshtein has given as 'most likely' to
be what they meant from their previous input, or to try typing in
again.

It's not perfect, and the addition of some more alternative names,
common abbreviations, etc. would be useful, but we don't tend to get
complaints about that bit going wrong.

-- 
Chris

[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index