Skip to content

Instantly share code, notes, and snippets.

@stevefaulkner
Last active December 19, 2015 09:48
Show Gist options
  • Save stevefaulkner/5935190 to your computer and use it in GitHub Desktop.
Save stevefaulkner/5935190 to your computer and use it in GitHub Desktop.
using label element for associating extra descriptive text
example 1 single label wraps primary label text and auxiliary label text results
in accessible name for the control being the a concatenation of the primary and auxiliary label text.
conforming:
<label>name <input type"text"> last name only please</label>
example 2 primary label = accessible name, auxiliary label = accessible description
conforming:
<p><label>name <input type"text" aria-describedby="instructions"></label></p>
<p><label id="instructions">last name only please</label></p>
non-conforming:
<label>poot</label> <input>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment