[uf-dev] Using class for non-human data

André Luís andr3.pt at gmail.com
Tue Jun 24 05:24:07 PDT 2008


On Tue, Jun 24, 2008 at 1:13 PM, Eivind Uggedal <eivindu at ifi.uio.no> wrote:
>> <abbr class="dtstart data{2008-06-23}" title=June 23rd, 2008">Today</abbr>
>>
>> 1. grab elementByClassName( dtstart )
>> 2. get classnames as array
>> 3. grab classname after dtstart(ie, i+1, i being the index of
>> dtstart), does it match /data{[^}]*}/ ?
>
> It would be potentially dangerous to have assumptions of the ordering
> of class names. Another level of unneeded complexity. This snippet
> should also be parseable:
>
> <abbr class="fancy data{2008-06-23} dstart" title=June 23rd, 2008">Today</abbr>
>
> --

Eivind,

I understand that. I was trying provide an example that allowed
multiple classnames + associated values within the same element.

I agree it's added complexity... if you never really need to add extra
classnames to the same element and specify their data values, it's
perfectly fine using whatever data{.*} you find (first?). :)

Oh one thing I haven't seen mentioned is... this doesn't have to
_replace_ abbr design pattern, does it? If parsers added this way to
parse values, authors with accessibility concerns could use this
instead, while avoding breaking current deployments of abbr DP.

--
André



More information about the microformats-dev mailing list