RE: PROPOSAL: Expressing WAI-ARIA in CSS


[Håkon Wium Lie:]
> 
> Also sprach Jens O. Meiert:
> 
>  > > I am interested in being able to specify WAI-ARIA markup in CSS.
>  > >
>  > > The aria properties should cover semantics not currently specifiable
> > > in CSS;  >  > Why? CSS’s purpose is not to add meaning (semantics).
> 
> True, CSS is about styling. But the CSS syntax is quite handy for
> attaching any type of property/value pairs on elements.
> 
Indeed, and it remains my favorite 'old IE' feature: unknown CSS properties
are added to the selected elements' style as string values i.e. if you write:

.custom {
 foo: bar;
}

Then all the elements with class custom get a foo property added to their style 
object with value "bar". No JS needed. Some will argue this should not be part
of CSS on semantic  grounds; the result is that some selectors live in 
stylesheets and many others are written in code, with changing one sometimes
requiring updating the other. I'm not sure what's so obviously better about that.

Received on Monday, 14 January 2013 21:34:17 UTC