Skip to content

Implement error-message scanner rule (36b590) #355

@koddsson

Description

@koddsson

ACT Rule

  • ACT Rule ID: 36b590
  • Rule Name: Error message describes invalid form field value
  • WCAG SC: 3.3.1 Error Identification (Level A)

What it checks

This rule checks that when a form field is in an error state, the error message is descriptive and programmatically associated with the field. It verifies that aria-describedby or aria-errormessage references point to elements that contain text describing the error.

Feasibility

DOM-only feasible. The check involves:

  1. Finding form fields with aria-invalid="true"
  2. Checking that aria-describedby or aria-errormessage references exist and point to elements with text content
  3. Verifying the referenced error message elements are present in the DOM

No computed styles, layout, or browser APIs are required.

Notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions