7.2.2. Order drop-down list options in a logical way

When drop-down lists are used, the options they contain must be ordered logically.

The logical order depends on the context, but it may be:

  • Alphabetical order (a list of languages, for example).
  • Numerical order (a list of rankings, for example).
  • Practical order (“United Kingdom” in first place for a registration form for a British service).

Tip

It is a good accessibility practice to avoid using decorative characters (dashes, asterisks, spaces, etc.) as prefixes of the content of the <option> tag.

Their absence enables users to directly access the required value or group of values, by simply pressing the corresponding key on the keyboard (pressing the “I” key to go to “Italy”, for example).

Therefore:

<select>
    <option>--Austria</option>
    <option>--Belgium</option>
    <option>--England</option>
    <option>--France</option>
    <option>--Italy</option>
</select>

Should be replaced by:

<select>
    <option>Austria</option>
    <option>Belgium</option>
    <option>England</option>
    <option>France</option>
    <option>Italy</option>
</select>

notices/html-css/ordonner-les-options-de-maniere-logique-dans-les-listes-deroulantes.txt · Last modified: 11 June 2013 at 14:25 by Sébastien Delorme (Atalan)
 

Project coordinated by Atalan.

In partnership with:

Observers: