Re: bug Bug 11891 - add role attribute to list of global attributes and add definition for it (part of Issue 199)

On Fri, Jan 27, 2012 at 3:53 PM, Richard Schwerdtfeger
<schwer@us.ibm.com> wrote:
> The role attribute describes the role the current element plays in the context of the document. The attribute takes as its value one or more space-separated-tokens representing its role(s). The attribute describes the role(s) the current element plays in the context of the document. This can be used, for example, by applications and assistive technologies to determine the purpose of an element. This could allow a user to make informed decisions on which actions may be taken on an element and activate the selected action in a device independent way. A valid-role-token is defined by [WAI-ARIA].

Seems reasonable. Where does the WAI-ARIA spec define valid role tokens, though?

For example, how would an HTML conformance checker determine if
"accordion" is a valid role token?

The spec defines some roles, but also says user agents may extend them
with new roles and that future specs will define how to use these new
roles interoperably. It does say that "Content authors MUST NOT use
abstract roles because they are not implemented in the API binding".

Should HTML conformance checkers:

1. Allow any token that is not an abstract role defined in WAI-ARIA
(e.g. allow "accordion" and "checkbox" but forbid "input"?

2. Reject any token that is an abstract role defined in WAI-ARIA and
additionally require the token list to begin with a concrete role
defined in WAI-ARIA (e.g. allow "accordion" and "checkbox" but require
"checkbox" to come first).

3. Reject any token that is not a concrete role defined in WAI-ARIA
(e.g. reject "accordion" and "input" whereever they occur in the token
list)?

Whichever way, it would probably be best to be explicit.

--
Benjamin Hawkes-Lewis

Received on Friday, 27 January 2012 18:24:03 UTC