Last Updated on
Asking users to tell you which country they live is simple. Devising a method which is both usable and accessible for the user, and which provides good data is not. There are two main problems:
- There are between 194 and 239 countries, which is way too many for a drop-down select box (how long would you listen to JAWs read out that list until it got to Zambia, if that’s where you lived?)
- Some countries have synonyms: when I’m scrolling down a list, I don’t know whether I’m looking for “E” (England), “G” (Great Britain), “B” (Britain) or “U” for “United Kingdom”.
The most accessible, user-friendly way to receive input that a user incontravertibly knows is to ask the user to type their response into a free-text field, rather than require them to select it.
I’m riffing here on an excellent paper called Should I use a drop-down? (warning: PDF) by Sarah Miller and Caroline Jarrett (Jarrett is cited in the second edition of Steve Krug’s Don’t Make Me Think as “the authority on designing Web forms”). In it, they write,
Personal details such as name, address, and date of birth are so well known to us that it is much easier and more natural to type them in directly rather than selecting from a list.
And everybody knows which country they live in (or want to visit, or send a parcel to, or whatever the purpose of your form).
It should be reasonably simple to come up with server-side validation that corrects typos (so “Farnce” is silently corrected to “France” without asking the user. (Some languages have native functions that can do such fuzzy matching). This is more work for the programmer (isn’t that what they’re for?) but takes the work away from the customer, which is A Good Thing.
If we carve it up in other ways like Bruce then we just create more steps which breaks our credo of making this process with a minimum of steps for the user.
But as far as I can see, the only reason to go back to the user is if they’ve typed something absurd, or something ambiguous. For example, if the user has typed “Aus”, you could go back to them with a select box containing “Austria” and “Australia” and ask them to resolve the ambiguity that way. (Extra points if it’s a group of radio buttons for fewer than 5 alternatives, and a select for more than that.)
The last complexity – and where I’m soliciting your help – is to get a look-up table to ensure that synonyms are recognised. Using my example above, if I were running a postcode site, I would like to be able to vaildate that Wales, Scotland, England, Britain, Great Britain, GB, United Kingdom and UK are all the same country, and enter them all in the database as being the same (probably United Kingdom, in this case, but it’s largely arbitrary, as long as reporting software can compare like-with-like).
Can anyone suggest similar groups of synonyms that spring to mind (like United States, USA, America or Bosnia and Herzegovina ) that I can build into my validation routine?