HTML Techniques

Hi,

I created a test suite[1] to test how img, iframe, embed and object works in 
current UAs. I've discussed correct pass conditions on the WHATWG list[2], 
so I now believe the test suite is correct. I've checked the results in IE6, 
Firefox 1.6a1 and Opera9, and compared with what is recommended in HTML 
Techniques for WCAG 2.0.

>H46: Using null alternative text and no title attribute on img elements for
>spacer or purely decorative images.

This guideline seems a bit backwards. Authors should use CSS for purely 
decorative images.

>H48: Using the body of the object element.

What does "body" mean here? I suggest replacing it with "fallback content".

>H50: Using longdesc.
>[...]
><img src="97sales.gif" alt="Sales for 1997" longdesc="sales97.html">

"Sales for 1997" seems like appropriate title text, but inappropriate 
alternate text. The alternate text should probably be something like "The 
sales have increased by NN% for 1997.".

>H63: Using alt attributes on applet elements.

Why? <applet> can take fallback content as described in H62, which in itself 
is better than an alt attribute since attributes don't allow markup. Further 
more, I know of no implementation that supports the alt attribute for 
<applet>. I suggest dropping this guideline in favour of H62.

>H64: Using noembed with embed.
>H72: Providing alternative content for iframe.

Contents of <iframe> and <noembed> are not fallback content for the included 
content, they are fallback content for the element types themselves (just 
like <noscript> and <noframes>). Contents of <iframe> will be rendered if 
and only if <iframe>s are not supported. Contents of <noembed> will be 
rendered if and only if plugins are disabled. Should the included format not 
be supported or return a 404 or 410 response, then there is no fallback 
content. <iframe> and <embed> do not have the sort of fallback content that 
<img> and <object> have.

Perhaps H93 and H72 should be merged together.

>Editorial Note: Is it true that noembed can go either beside or inside 
>embed? Is there a preference?

<embed> is an EMPTY element type, just like <img>. It can't have any 
contents.

>H65: Using alt attributes on embed elements.

There is no alt attribute for <embed>. At least there are no implementations 
of an alt attribute for <embed> that I'm aware of.

Since <embed> and <noembed> are not defined by HTML4, I suggest dropping H64 
and H65.

[1] http://zcorpan.1go.dk/test/html/embedded/
[2] 
http://listserver.dreamhost.com/pipermail/whatwg-whatwg.org/2005-November/thread.html#5133

Regards,
Simon Pieters

Received on Tuesday, 29 November 2005 13:47:04 UTC