Last active
December 19, 2015 09:48
-
-
Save stevefaulkner/5935190 to your computer and use it in GitHub Desktop.
using label element for associating extra descriptive text
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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