W3C home > Mailing lists > Public > wai-xtech@w3.org > February 2009

Re: ARIA style sheet

From: Chris Blouch <chris.blouch@corp.aol.com>
Date: Mon, 23 Feb 2009 15:24:49 -0500
Message-ID: <49A30611.4020100@corp.aol.com>
To: James Craig <jcraig@apple.com>
CC: "'W3C WAI-XTECH'" <wai-xtech@w3.org>
I think Matt Machell wasn't saying so much that role:slider was a style 
but that we should embrace using something like CSS selectors to map one 
or more DOM nodes to one or more sets of ARIA attributes. Call it a 
shorthand way to add semantics. If I have 20 sliders and each one is a 
constructed by a <div class="slider"></div> it seems systemically wrong 
to have to put in all the ARIA attributes inline repeatedly whether by 
hand or via a dom walking script. We should have a means to infer the 
applicable ARIA semantic attributes from the already stated class or 
other other fingerprints defined by the selector. Maybe the problem is 
folks call them CSS selectors when really they could be used for broader 
purposes. Imagine all the handy stuff the selector cascade process could 
do to auto-generate appropriate ARIA markup for the same generalized 
chunk of HTML based on the context of its location in the DOM. All those 
joys and challenges of specificity could be made to work for ARIA as well.

CB

James Craig wrote:
> Chris Blouch wrote:
>
>> Why didn't we think of this before?
>
> We did.
>
>> Matt Machell had the bright idea that we should apply aria attributes 
>> to a page using the same css selector process we use for styling. 
>> Something like this:
>>
>> #first {
>> role: slider;
>> described-by: #second;
>> value-min: 10;
>> value-max: 30;
>> }
>
> Justin James had the same idea. See thread.
> http://lists.w3.org/Archives/Public/wai-xtech/2008Jun/0024.html
>
>> He then went on to write 12 lines of JQuery script to implement the 
>> technique. See
>> http://www.kryogenix.org/days/2009/02/22/a-wai-aria-stylesheet
>
> I agree that it's useful if implemented through JavaScript.
>
> As a potential solution for assigning semantics to the DOM, I think 
> it's a reasonable idea, but I disagree with using this as the standard 
> method to assign roles. In other words, the CSS WG should not add an 
> official 'role' property in a /style/ sheet to assign semantic meaning 
> in the document.
>
> If this is being used as a workaround for backwards compatibility, 
> that's fine, but not as the standard way to assign roles. The 
> method mixes semantics with style by having the JavaScript 
> (controller) view style information in the CSS (view) to then add 
> semantic information to the DOM (model) which could have been there to 
> begin with.
>
>> This just seems like  an infinitely useful solution that ought to be 
>> developed and implemented native in the browsers.
>
> It is supported, through XBL or HTC, but only the JavaScript option is 
> well-supported. 
>
Received on Monday, 23 February 2009 21:01:28 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 27 April 2012 13:16:01 GMT