Page is a not externally linkable
EvertVd - 4:00 pm on Feb 18, 2012 (gmt 0)
I am reading the WAI-ARIA spec and trying to make a test project with it.
There are some examples in the spec talking about form-type elements like checkboxes, but the spec uses this term to indicate any element that can function as a checkbox. In other words, it talks about checkboxes in general and not specifically about the element input[type=checkbox]
Which leads to my question, which of the following is better:
<label for='myCheck'>Just a checkbox</label>
<input id='myCheck' type='checkbox'>
or:
<label id='lblCheck' for='myCheck'>Just a checkbox</label>
<input id='myCheck' type='checkbox' aria-labelledby='lblCheck'>