Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Required form input field

  • Required group of radio buttons

  • Required group of checkboxes

  • Required single checkbox

...

Required Form Input Field

Hide the <label> element for sighted users by using CSS. The label will not appear visually, but screen readers will still announce it.

...

View HTML Markup on Github

...

Required Group of Radio Buttons

Apply a “title” attribute to the <input> field. If a form field has a title attribute but no <label>, screen readers will treat the title as a label.

...

View HTML Markup on Github

Technique Three - ARIA Label and Markup

...

Required Group of Checkboxes

The “aria-label” attribute can also be used for screen reader users.

Code Block
<input id="search" type="text" aria-label="Enter search criteria">
<button>Search</button>

View HTML Markup on Github

...

Required Single Checkbox

The “aria-label” attribute can also be used for screen reader users.

...

View HTML Markup on Github