- From: Doug Schepers <schepers@w3.org>
- Date: Fri, 05 Oct 2007 10:53:22 -0400
- To: anthony.grasso@cisra.canon.com.au
- Cc: public-xhtml2@w3.org, Simon Pieters <simonp@opera.com>, aleventh@us.ibm.com, www-svg <www-svg@w3.org>
Hi, Anthony- Anthony Grasso wrote (on 10/5/2007 12:46 AM): > > I'm trying to think of some use cases for @role to help me understand > it's purpose better. > > So as far as I can tell 'roles' are specified on elements and it kind of > categorises them? right? Right, the 'role' attribute can be used to simply provide some semantics without any behavior, so you could label something as related to navigation, or as a banner ad, or pretty much any other categorization that people find useful. The 'class' attribute could also be used this way, but that's more controversial, since some people think that CSS should only be used for styling, and that attaching semantics to it adds content. > If the above is correct, then I guess this gives implementations the > option to treat elements in a certain way according to their 'role'? Right again, in combination with the ARIA taxonomy, a UA can assign particular preset behaviors (including supplying user notifications and choices of actions) to elements so labeled. > Or again if the above is correct, a use case would be having an XSLT to > remove all of the elements that have 'navigation' 'role' when printing? I don't think that's a primary use case in the minds of the designers, but neither do I think it's a violation of the spirit of it. In fact, the 'role' attribute could take on special values that pertain specifically to print, and don't affect the on-screen rendering or interactive behavior at all. As I understand it, 'role' is meant to be pretty generic, though the XHTML2 WG has some clever uses for it already in mind. > Is my understanding correct... or have missed the boat completely? No, I think you just caught a different boat, but it's also traveling in a useful direction. It's good to have people thinking in different directions. That 'role' can be useful to offscreen uses (not just print, but pre- or post-processing, and for a variety of tasks with XSLT) reinforces that it is is useful to add. Regards- -Doug Schepers W3C Staff Contact, SVG, CDF, and WebAPI
Received on Friday, 5 October 2007 14:53:41 UTC