FS FormScript

Accessibility

Accessible by construction

The form says “invalid” and does not say how to fix it. After submit, focus is lost. The label was placeholder text and vanished while typing.

what this buys you

  • A labelled control per field
  • Focus moves to the error summary
  • No placeholder-only labels
  • Summary entries link to fields
Language specification 1.0 · level 3 of 5

Promise. Accessibility is normative (§13). A Level 2+ renderer must keep a labelled control for every active field, move focus to an error summary on failed submit, link each summary entry to its field, and never use a placeholder as the only label. @formscript/render-dom implements that contract for HTML.

A real label

Every active field keeps a labelled control. A placeholder is never the only label, because it vanishes while typing.

Focus moves to the error

A failed submit puts focus on the error summary, and every entry links back to the field that caused it.

Normative, not optional

These are requirements on a renderer, not a plugin you may forget to install before launch.

forms
form loan version = "1.0" {
  field first_name {
    type = string
    required = true
  }
  field annual_income {
    type = number
    validate { min = 0 }
  }
  output {
    first_name: string
    annual_income: number
  }
}

Try a failed submit in the playground: the summary receives focus, and each entry points at its control.

Boundary. Other platforms still need their own renderer that maps the fourteen intents. The obligations travel with the intents.