MDN self-hosted library · e01.org
ARIA: form role / notebook

ARIA: form role

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

html
<div role="form" id="contact-info" aria-label="Contact information">
  <!-- form content -->
</div>
html
<div role="form" id="send-comment" aria-label="Add a comment">
  <label for="username">Username</label>
  <input
    id="username"
    name="username"
    autocomplete="nickname"
    autocorrect="off"
    type="text" />

  <label for="email">Email</label>
  <input
    id="email"
    name="email"
    autocomplete="email"
    autocapitalize="off"
    autocorrect="off"
    spellcheck="false"
    type="text" />

  <label for="comment">Comment</label>
  <textarea id="comment" name="comment"></textarea>

  <input value="Comment" type="submit" />
</div>
html
<form id="send-comment" aria-label="Add a comment">…</form>
html
<div role="form" id="gift-cards" aria-label="Purchase a gift card">
  <!-- form content -->
</div>