[uf-dev] Suggested new parsing rule for alt text
sid jansen
sid at sidisinsane.com
Fri Mar 23 02:31:24 PST 2007
2007/3/23, Drew McLellan <lists at allinthehead.com>:
>
> On 22 Mar 2007, at 17:14, Andy Mabbett wrote:
>
> > 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.
>
> tbh I though that this was already a rule. It's a rule native to
> HTML, so we therefore inherit it for free.
>
> It certainly seems like common sense, and I believe hKit already
> behaves in this way.
>
> drew.
>
> _______________________________________________
> microformats-dev mailing list
> microformats-dev at microformats.org
> http://microformats.org/mailman/listinfo/microformats-dev
>
I disagree.
By using the h1-tag you are already announcing that the enclosed data will
be text data, just as the img-tag announces upcoming picture-data.
So, even the use of the img-tag within any kind of heading is semantically
incorrect html. In addition, the alt-attribute is meant as, in this case,
non-text-equivalent to compensate reading-disabilities (More here:
w3.org/TR/WCAG10-TECHS/#def-text-equivalent), not to add additional or even
false information to a non-text element.
The reason for wanting to place an img-tag within a heading is of course a
pure matter of style, which can easily be achieved by one of the numerous
Image-Replacement techniques (Actually they're Text-Replacement techniques.
A list you can find here: mezzoblue.com/tests/revised-image-replacement)
which add the desired image as a background defined in the stylesheet,
rather than polluting the html file with misleading markup.
So, the problem of your example is that I believe your approach is wrong and
unnecessary.
Sid.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://microformats.org/discuss/mail/microformats-dev/attachments/20070323/d6fe5ed2/attachment.html
More information about the microformats-dev
mailing list