Prepared Docs

Prepared Docs

⌘K

    Loading navigation…

User

  1. Components
  2. Input
  3. Accessibility
  4. Error Handling And Validation

Input

Error Handling and Validation

Communicate validation errors accessibly.

Invalid

aria-invalid

Use aria-invalid to indicate validation errors.

Prefer the errorText prop when the surrounding component renders the error inline—Input automatically sets aria-invalid and points aria-errormessage at the rendered error node.

Error Message

aria-errormessage

Link error messages explicitly for complex validation.

Error Announcements

Announce errors dynamically for live validation.

Previous

Accessibility / Labels and Identification

Next

Accessibility / Required Fields

On this page

Invalid
aria-invalid
Error Message
aria-errormessage
Error Announcements