Re: Making ARIA and native HTML play better together

On 9 May 2015 at 22:22, Alice Boxhall <aboxhall@google.com> wrote:

> However, I'm on the fence about whether this proposal is the way forward
> for that problem. On the one hand, many developers (including me) have an
> expectation when they first encounter ARIA that it will magically affect
> behaviour, so it seems like a good "path of desire" to go ahead and fulfill
> that expectation.


Hi Alice, I would not go so far as to call it a proposal ;-) it is just a
few ideas , mostly not thought out at this stage and definitley not to be
taken as a package.

I think idea 1 has the potential to be implemented without being overly
burdensome, so forgetting about the ideas for the moment:

1. When a role is used that matches the default implicit semantics of
> labelable HTML elements [1] use of the label element will result in the
> same behaviour as the native element and a <label>.
> Example:
>
> <span role="checkbox" id="customcheck"></span> <label for="customcheck">i
> like this idea</label>
>
>
What this would entail (i think ) is the addition of a defined set of roles
to the labelable elements list [1]. So when an element with one of the
defined roles is associated with a lable using the for attribute or as a
child of label, the behaviour matches that currently defined in HTML

The label element's exact default presentation and behaviour, in particular
> what its activation behaviour might be, if anything, should match the
> platform's label behaviour. The activation behaviour of a label element
> for events targeted at interactive content descendants of a label
> element, and any descendants of those interactive content descendants, must
> be to do nothing. [2]
>

labelable elements that have default implict ARIA semantics [3]

input type=checkbox - role=checkbox
input type=radio -  role=radio
input type=text - role=textbox
input type=number - role=spinbox
textarea - role=textbox
progress - role=progressbar
select - role=listbox or combobox

So the suggested implementation would be that where a role is used that
matches one in the list above, the association of a label element would
result in the same behaviour as it does for the corresponding HTML element
both interaction behaviour and accessble name association [4].


[1] http://www.w3.org/TR/html51/semantics.html#category-label
[2] http://www.w3.org/TR/html51/semantics.html#labeled-control
[3]
http://rawgit.com/w3c/aria/master/html-aam/html-aam.html#html-element-role-mappings
[4]
http://rawgit.com/w3c/aria/master/html-aam/html-aam.html#accessible-name-and-description-calculation
--

Regards

SteveF

Received on Monday, 11 May 2015 09:32:34 UTC