Picto thématique

Rule n° 70 - Each form field’s label indicates the required data format, where applicable.

Let us not turn a date entry, currency or other into a guessing game. With or without a dash or hyphen.The year or the month first? Etc.etc. And as for password fields:, Is there an uppercase letter needed, special character or other magical formulae?

#Forms #Development #Accessibility

Goal

  • Reduce the risk of input errors.
  • Reduce the risks associated with sending incorrect or unusable data.
  • Prevent the user from giving up, for lack of information about the expected input.
  • Improve the accessibility of content for people with disabilities.

Implementation

Indicate what is the expected input format using the label associated with the field. For example: <label for="mail">Email Address (of the type mail@example.com)</label>

Control

For each form:

  • Submit various possible errors in each form, for non-compliance with a requested or predictable format (format of email address, date, etc.), in order to detect the fields for which a specific input format is required.
  • Check, using a code inspector, that the label associated with each relevant field indicates the expected format in the label element or by using an ARIA attribute.

By Opquast - Read the license