[uf-discuss] Simple solution to abbr-D-P accessibility concerns:
'Title Trigger'
John Allsopp
john at westciv.com
Fri Aug 17 16:15:28 PDT 2007
Jeremy,
> Andy Mabbett wrote:
>> Use a class name; say "ufusetitle" (for "microformat, use title") or
>> something equally unlikely to otherwise occur in the wild, on any
>> element, to trigger the use of the title attribute.
>
> But now the class attribute contains an instruction rather than a
> description of the enclosed contents. This feels like an abuse of
> the class attribute to me.
I see assertions about the correct use of the class attribute stated
quite a bit, as well as criticisms of particular uses as being
abuses, anti patterns and so on. I don't want to weigh into any
specific debates, but do want to draw people's attention to the
specification itself, from which in the first instance at least,
justification for any such arguments needs to be drawn.
HTML401 defines the class attribute thus
"The class attribute, on the other hand, assigns one or more class
names to an element; the element may be said to belong to these
classes. A class name may be shared by several element instances. The
class attribute has several roles in HTML:
As a style sheet selector (when an author wishes to assign style
information to a set of elements).
For general purpose processing by user agents." [1]
So, in effect, all the uses we make of the class attribute outside of
using it for CSS selectors fall into the heading of "general purpose
processing".
In that, there's no mention of using class for semantics (which is a
use pattern developed over time and sanctioned by convention), of
restrictions for data over description, and indeed, Andy's suggestion
of "ufusetitle" is arguably more strictly speaking for "general
purpose processing" than applying a class value for semantic purposes
(though the name 'class' does imply classification, taxonomies, and
semantics more generally).
Microformats have made use of clever interpretations of the HTML
specification, and discovering appropriate uses of little used
elements and attributes, or through intelligent interpretations of
their definitions. Perhaps we are overlooking powerful and useful
features of HTML, such as using class (and id) for 'general purpose
processing'?
j
[1]http://www.w3.org/TR/html4/struct/global.html#h-7.5.2
More information about the microformats-discuss
mailing list