Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Dropdown Lists: Difference between revisions

From MoodleDocs
Line 17: Line 17:


=== Example title ===
=== Example title ===
== (Optional) Related guidelines ==
== Related guidelines ==
[[Checkbox|Checkboxes]] and [[Radio button|Radio buttons]] should be used instead in most cases.
[[Checkbox|Checkboxes]] and [[Radio button|Radio buttons]] should be used instead in most cases.



Revision as of 09:46, 8 August 2009

Moodle User Interface Guidelines > Dropdown Lists

Note: This page is a work-in-progress. Feedback and suggested improvements are welcome. Please join the discussion on moodle.org or use the page comments.

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

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 may raise serious accessibility issues. Where one is needed, a navigation menu (usually a CSS styled unordered list in HTML) should be used.

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

Drop-down Lists