[uf-dev] Suggested new parsing rule for alt text

Andy Mabbett andy at pigsonthewing.org.uk
Fri Mar 23 04:41:14 PST 2007


In message
<21e770780703230447v70b1b224ib2ce2cd8fee3101a at mail.gmail.com>, Brian
Suda <brian.suda at gmail.com> writes

>> I suggest that this rule be adopted, for *all* microformats, unless
>> there are good reasons for specific exceptions:
>>
>>          Where an element contains only an image element, and the parser
>>          is expecting text, the alt text of the image should be used.

>> Can anyone foresee any problems with that?

>What if there are 2 <img> elements?

Concatenate the alt texts, in the order they occur, with a space between
them.

> what if there is no ALT element?

Treat as we would presently treat:

        <h1><img class="fn org" src=logo.jpg"></h1>

>what if it is an <object> element? what if it is an
><area>?

My proposal relates specifically to <img>; my experience of using object
and area are too limited for me to comment. I'm sure others can.

>What if the DOM updates the H1 at a later time,

What if the DOM updates any other part of a microformat?

> what about sIFR

"Scalable Inman Flash Replacement"? As for <object> and <area>.

>If the author can

You excised the relevant part of my post:

        It will facilitate the microformatting of templated CMS data
        (not least that in Wikipedia)

In CMSs, the author often *cannot*.

> the more complexity we layer into these parsing
>rules for very little benefit, the more bugs, errors, problems we
>introduce.

Your "very little benefit" is hypothetical and unfounded.

-- 
Andy Mabbett
                 <http://www.pigsonthewing.org.uk/uFsig/>

                    Welcome to the world's longest week!


More information about the microformats-dev mailing list