Picto thématique

Rule n° 69 - Each form field’s label indicates whether or not it is a required field.

It is better to prevent the user from making a mistake because they were not given enough information from the outset.

#Basics #Accessibility #Conception #Development #Forms #Privacy

Goal

  • Tell users in advance whether or not a field is required.
  • Prevent mistakes before they are made.
  • Improve the accessibility of content for people with disabilities.

Implementation

Indicate that the entry is mandatory in the label associated with the field. If this indication is made with a symbol (an asterisk for example), an explanation of this symbol should come before the form.

Control

For each form:

  • Check that the label associated with each field indicates that it is mandatory, if necessary by checking, with a code inspector, that the information is indeed present in the label element, in anaria-label attribute, or else that it is linked to the field via an aria-labelledby or aria-describedbyattribute.
  • Check that the fields with labels not specifying that they are mandatory are actually optional, by validating the form without completing these fields. If an error message indicates that they must be completed or if the form cannot be validated in this way, the best practice is not valid.

By Opquast - Read the license


Discover Opquast training and certification

The objective of these rules and the Opquast community mission is ‘making the web better’ for your customers and for everyone! Opquast rules cover the key major areas of risk that can negatively affect website users such as privacy, ecodesign, accessibility and security.

Opquast training has already allowed over 19,000 web professionals to have their skills certified. Train your teams, contact us

We offer a 1 hour free discovery module.