Glossary

form

Also known as: <form>, form element, form landmark, submit
TechHTMLAccessibility

Definition

The element that groups controls into one submission — inputs, selects, buttons — with action and method for where and how it goes, a submit event the whole thing fires (Enter in a text field included), and a form landmark when it has an accessible name; the unit FormData reads and validation runs over

A form is more than a container: Enter submits it, a <button> inside defaults to submitting it, required and pattern validate it before any script runs, method=“dialog” closes a dialog with it, and the browser will autofill it. Controls outside a <form> have none of that, which is the bug behind every custom form that only works with the mouse. Nuxt UI’s UForm renders one and layers schema validation on top; the sign-in page here is a form with a magic-link email and a submit, and the search box is intentionally not one.

Tech

The element that makes Enter mean go. Everything a form does for free is something a <div> of inputs will have to be taught, badly, in JavaScript.

Related Terms

  • a: Appearance
  • ?: Keyboard shortcuts