WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Does WCAG require that when you click a label it checks the checkbox or radio button?

for

From: Paul Adam
Date: Nov 19, 2015 9:57AM


http://www.w3.org/TR/UNDERSTANDING-WCAG20/keyboard-operation-keyboard-operable.html

2.1.1 Keyboard: All functionality of the content is operable through a keyboard interface without requiring specific timings for individual keystrokes, except where the underlying function requires input that depends on the path of the user's movement and not just the endpoints. (Level A)

I'm choosing NOT to water down WCAG and say that a button element only has to work with enter key when in reality all native <button>s work with enter and spacebar.

http://www.w3.org/TR/UNDERSTANDING-WCAG20/ensure-compat-rsv.html
4.1.2 Name, Role, Value: For all user interface components (including but not limited to: form elements, links and components generated by scripts), the name and role can be programmatically determined; states, properties, and values that can be set by the user can be programmatically set; and notification of changes to these items is available to user agents, including assistive technologies. (Level A)

I'm saying that if you use the role of button but you don't implement that role like a native button then you're not meeting Name, Role, Value.

Paul J. Adam
Accessibility Evangelist
www.deque.com

> On Nov 19, 2015, at 10:51 AM, John Foliot < <EMAIL REMOVED> > wrote:
>
> Paul Adam wrote:
>>
>> I think WCAG does require you emulate the native behavior of a checkbox with a
>> clickable label if you were to make an ARIA checkbox.
>
> Can you kindly point us to the normative text in WCAG that leads you to believe this?
>
>>
>> I also think if you use role=button you're required to make it work with the
>> spacebar key like a native <button> element but maybe I'm wrong there too! ;)
>
> Can you kindly point us to the normative text in WCAG that leads you to believe this?
>
> JF
>
> > > >