Knowledgebase

Forms and Input Elements Print

  • webdevelopment, email, security, errors, guide, howto, solution, zillionkinghost
  • 0

Collecting information.

WHAT A FORM REQUIRES

Fields Labels associated with each A submission method A destination

WHY LABELS MUST BE ASSOCIATED

So assistive technology announces them, and so tapping the label focuses the field.

WHAT NOT TO USE AS A LABEL

Placeholder text.

WHY

It disappears on typing, is frequently too low contrast, and is handled inconsistently by assistive technology.

WHAT INPUT TYPES PROVIDE

Appropriate keyboards on mobile Built-in validation Appropriate controls

WHAT TO USE

The specific type: email, telephone, number, date, and others.

WHY

It removes work and errors for the user.

WHAT GROUPING PROVIDES

Related fields announced together, with a description of the group.

WHAT TO USE FOR A SET OF RELATED CHOICES

A grouping element with a legend.

WHAT TO MARK

Required fields, both visually and in the markup.

WHAT TO PROVIDE ON ERROR

A message associated with the field, announced to assistive technology.

WHAT TO NEVER RELY ON

Browser validation for security. It is convenience only.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot