Semantics

A landmark region that contains a collection of items and objects that, as a whole, combine to create a form.

Additional info from the ARIA specification

See related search.

A form can contain a mix of host language form controls, scripted controls, and hyperlinks. Authors are reminded to use native host language semantics to create form controls whenever possible. If the purpose of a form is to submit search criteria, authors SHOULD use the search role instead of the generic form role.

Authors SHOULD give each element with role form a brief label that describes the purpose of the form. Authors SHOULD reference a visible label with aria-labelledby if a visible label is present. Authors SHOULD include the label inside of a heading whenever possible. The heading MAY be an instance of the standard host language heading element or an instance of an element with role heading.

If an author uses a script to submit a form based on a user action that would otherwise not trigger an onsubmit event (for example, a form submission triggered by the user changing a form element's value), the author SHOULD provide the user with advance notification of the behavior.

Assistive technologies SHOULD enable users to quickly navigate to elements with role form. User agents SHOULD treat elements with role form and an accessible name as navigational landmarks. User agents MAY enable users to quickly navigate to elements with role form.

Abstract Role

  • LandmarkRepresents a top-level section of a page, relevant to a specific purpose, that a user may want to scan for quickly and could appear in a site map or table of contents.

Content Categories

  • Flow ContentAn element that structures and organizes the body of a web document.

Allowed Descendants

Flow Children Allowed

No form element descendants allowed.

Usage

Allowed HTML elements

Implicit semantics

These elements have the role semantics by default, without needing to set the role attribute. Reach for elements with native semantics first when choosing how to implement a role in your content.

  • form

Explicitly allowed

  • None

Elements that can have any role

  • abbr[role=form]
  • address[role=form]
  • b[role=form]
  • blockquote[role=form]
  • canvas[role=form]
  • cite[role=form]
  • code[role=form]
  • custom-element[role=form]
  • data[role=form]
  • del[role=form]
  • dfn[role=form]
  • div[role=form]
  • em[role=form]
  • figure[role=form]
  • i[role=form]
  • ins[role=form]
  • kbd[role=form]
  • mark[role=form]
  • output[role=form]
  • p[role=form]
  • pre[role=form]
  • q[role=form]
  • samp[role=form]
  • small[role=form]
  • span[role=form]
  • table[role=form]
  • tbody[role=form]
  • tfoot[role=form]
  • thead[role=form]
  • time[role=form]
  • u[role=form]
  • var[role=form]