Note: You are currently viewing documentation for Moodle 2.4. Up-to-date documentation for the latest stable version of Moodle may be available here: Dropdown Lists.

Development:Dropdown Lists: Difference between revisions

From MoodleDocs
mNo edit summary
Line 15: Line 15:


A dropdown menu is not a navigation menu, but a form element. Hiding the submit button and making the form element submit automatically when a value is selected raises serious accessibility issues: among others, keyboard navigation is seriously hindered on many browsers. Where one is needed, a navigation menu (usually a CSS styled unordered list in HTML) should be used.
A dropdown menu is not a navigation menu, but a form element. Hiding the submit button and making the form element submit automatically when a value is selected raises serious accessibility issues: among others, keyboard navigation is seriously hindered on many browsers. Where one is needed, a navigation menu (usually a CSS styled unordered list in HTML) should be used.
'''Never''' use single select boxes for selection of multiple items (ctrl/shift click to select multiple). Instead always use checkboxes.


== Examples and implementation ==
== Examples and implementation ==

Revision as of 12:57, 4 September 2009

Moodle User Interface Guidelines > Dropdown Lists

Note: This article is a work in progress. Please use the page comments or an appropriate moodle.org forum for any recommendations/suggestions for improvement.

Status: INCOMPLETE
This is a guideline for a Moodle Interface Guideline. Comments: developer forum thread


Problem

Context

Forces: factors that affect selection

  • There may be too little room for several radio buttons or even for a checkbox
  • Dropdowns hide information, and thus slow down users. If users need to make selections in multiple dropdowns one after another, usage quickly becomes frustrating. Dropdowns often require very careful mouse manipulation as the vertical space that needs to be hit usually is not very big. If you click a couple of pixels off, you get to start all over again, and frustration adds up.

Solution

Common mistakes

Dropdown lists are used in Moodle (1.9) too much, and should be replaced with a checkbox when the choice is just yes/no, or otherwise usually with radio buttons.

A dropdown menu is not a navigation menu, but a form element. Hiding the submit button and making the form element submit automatically when a value is selected raises serious accessibility issues: among others, keyboard navigation is seriously hindered on many browsers. Where one is needed, a navigation menu (usually a CSS styled unordered list in HTML) should be used.

Never use single select boxes for selection of multiple items (ctrl/shift click to select multiple). Instead always use checkboxes.

Examples and implementation

Example title

Related guidelines

Checkboxes and Radio buttons should be used instead in most cases.

Related issues in the tracker

TODO: go through the misuses of dropdown lists and create tickets

Further information / Sources

GNOME HIG: Drop-down Lists