Section 3 Form Components

3.1 Component Types

Engles states the top 3 components to use on a form are:

  • radio buttons
  • checkboxes
  • text boxes

for the following reasons:

  • users are familiar with them
  • they work on all screen sizes, including mobile
  • they’re built into the HTML specification
  • they’re accessible
  • they’re simple to use

3.1.1 Input text field

3.1.1.1 Best Practices:

3.1.1.1.1 Use field length as an affordance

Match the size of the text input box to the length of the response the user should provide.

3.1.1.1.2 User should be able to judge the state of the field.

Field focus should be a visual cue – such as changing the color of the border or background of the selected input field, or showing the cursor in the input field. Think of it as a hint you leave users regarding where they are.

3.1.1.1.3 Say something here like Use appropriate ddd and ssss

Specifying an appropriate type attribute (e.g. type=“tel” for telephone number fields) will not only control what input is displayed, but also helps mobile devices select a keyboard layout suitable for entering that type of data.

3.1.1.2 Anatomy of a text box

An input text field consists of the following parts:

  1. Container/Border
  2. Label
  3. Placeholder/Input text
  4. Trailing icon (Optional element)
  5. Helper text/Error text (Optional element)
  6. Leading icon (Optional element)
3.1.1.2.1 Container

Say something about the container

3.1.1.2.2 Label

Top line label improves speed of completion (easy to scan), label to the left improves accuracy. Use sentence case.

3.1.1.2.3 Input text or Placeholder text

Use placeholder text for instructions only e.g. Please select… or DD/MM/YYYY. There should be a very clear distinction between the placeholder itself and the value typed by the respondent. If there is not, the respondent might think that the fields with placeholders are already filled fields.

3.1.1.2.4 Icons

Icons can be effective labels when they are easy to decipher, either because their meaning is clear or because they are familiar, such as the text formatting icons used on most text editor toolbars. When the meaning is not clear, icons are best paired with descriptive text. The icons are easy to visually scan and recognize, and the text provides additional clarity about the purpose of the control. https://www.webstyleguide.com/7-interface-design.html

3.1.1.2.5 Help text

Position the help text between the label and the input field. Don’t use headings, labels or placeholder text for help. text.4 Don’t repeat the label or explain the obvious (eg fill in your first name).

3.1.2 Radio Buttons

Radio buttons are used for mutually exclusive choices #### Best Practices:

3.1.2.0.1 All options should be visible.

Users must be able to scan and compare options to make an appropriate selection

3.1.2.0.2 Vertically align the buttons

When possible, arrange the radio buttons vertically for easier reading. If the choice is limited to binary or opposite (light/dark) options, then they can be aligned horizontally. If you are aligning horizontally, make sure to space the buttons and labels so that it’s abundantly clear which choice goes with which label.

3.1.3 Check Boxes

3.1.6 Buttons

Short (< 3 word) labels on buttons. A good rule of thumb is to answer the question “I want to…” from the user’s perspective.