Re: CfC: Checkbox and Radio button labels and 1.3.1

On 7 December 2015 at 16:49, Paul Adam <paul.adam@deque.com> wrote:

> <p><input type=“checkbox”> Please send me a ton of email</p>


Apologies, but I am getting confused here.

The code example passes 1.3.1 Info and Relationships because the content is
grouped by the <p> element and passes 3.3.2 Labels or Instructions as the
control has a visible prompt, but fails 1.1.1 Non-text Content and 4.1.2
Name, Role, Value as the control does not have a name.

There are a number of possible methods to resolve the failure state
including:

via label
<p><label><input type=“checkbox”> Please send me a ton of email</label></p>

via aria-label or title attribute
<p><input type=“checkbox” aria-label="Please send me a ton of email">
Please send me a ton of email</p>

or via aria-labelledby

<p id="label"><input type=“checkbox” aria-labelledby="label"> Please send
me a ton of email</p>

Is the above a reasonable assessment?

--

Regards

SteveF
Current Standards Work @W3C
<http://www.paciellogroup.com/blog/2015/03/current-standards-work-at-w3c/>

Received on Monday, 7 December 2015 22:31:58 UTC