SIA-R82Error message describes invalid form field value

Accessibility requirements

This rule tests conformance of the following accessibility requirements:

Description

This rule checks that text error messages provided when the user completes a form field with invalid values or using an invalid format, identify the cause of the error or how to fix the error.

Applicability

This rule applies to every element in the HTML namespace that has one of the following semantic roles:

  • checkbox,
  • combobox,
  • listbox,
  • menuitemcheckbox,
  • menuitemradio,
  • radio,
  • searchbox,
  • slider,
  • spinbutton,
  • switch or
  • textbox.

The list of applicable semantic roles is derived by taking all the ARIA 1.1 roles that:

Expectations

  1. Each test target either has no form field error indicators, or at least one of the form field error indicators allows the identification of the related test target, through text, non-text content, or presentation.

    A single form field error indicator can be related to multiple test targets. For example, an error message at the top of a form can list all the form fields that are required and are empty.

    A single test target can be related to multiple form field error indicators. For example, a text field can have a red border around it, an error icon adjacent to it, an error message below it, and another error message at the top of the form. All of these are error indicators for the same form field.,2. Each test target either has no form field error indicators, or at least one of the form field error indicators describes:

    • the cause of the error, or
    • how to resolve it,

in text that is visible.,3. Each test target either has no form field error indicators, or at least one of the form field error indicators describes:

  • the cause of the error, or
  • how to resolve it,

in text that is included in the accessibility tree or included in the accessible name or accessible description of the test target.

Assumptions

This rule makes no assumptions.

Accessibility support

This rule has no known accessibility support concerns.

Examples

Acknowledgments

This document includes material copied from or derived from https://act-rules.github.io/rules/36b590/. Copyright © 2021 W3C® (MIT, ERCIM, Keio, Beihang).