W3C home > Mailing lists > Public > public-html@w3.org > May 2015

RE: Making ARIA and native HTML play better together

From: Léonie Watson <lwatson@paciellogroup.com>
Date: Mon, 11 May 2015 10:54:58 +0100
To: "'Steve Faulkner'" <faulkner.steve@gmail.com>, "'HTMLWG WG'" <public-html@w3.org>
Cc: "'Chaals from Yandex'" <chaals@yandex-team.ru>, "'Richard Schwerdtfeger'" <schwer@us.ibm.com>, "'Alice Boxhall'" <aboxhall@google.com>
Message-ID: <00cd01d08bd0$8b2b3ef0$a181bcd0$@paciellogroup.com>
From: Steve Faulkner [mailto:faulkner.steve@gmail.com] 
Sent: 07 May 2015 06:42

On another thread recent thread, leonie and chaals [3] talked about adding behaviours to ARIA. Here are a few ideas:

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>.


<span role="checkbox" id="customcheck"></span> <label for="customcheck">i like this idea</label>

User able to click on label to check/uncheck 


If we did attempt to break the fourth wall of ARIA, this would be a good first step. I don’t think it would cause backwards compatibility issues, but it could improve the usability of such controls for keyboard users.

2. roles that match the default implicit semantics of interactive elements are focusable (without need to explicitly set tabindex)


<div role="button">press me</div>

will be included in the focus order.


3. roles that match the default implicit semantics of interactive elements [2] inherit the interaction behaviour of the native elements


<div role=button>press me</div>

can be activated the same way a html <button> element can be:.

via space, enter ,click , touch or whatever.


This is where things start to get more complex. If we could get the browser to throw in keyboard support for free, it might be a step in the right direction though.


With a custom button it’s necessary to provide both mouse and keyboard event handlers/listeners. If you use a native <button>, the browser automatically provides the keyboard support.


What if the browser provided the equivalent keyboard behaviour based on the presence of role=”button”, and the behaviour defined by the mouse handler?







Léonie Watson Senior accessibility engineer, TPG

@LeonieWatson @PacielloGroup PacielloGroup.com


Received on Monday, 11 May 2015 09:55:22 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:46:13 UTC