[whatwg] The IMG element, proposing a CAPTION attribute

Alexey Feldgendler alexey at feldgendler.ru
Wed Nov 22 06:35:46 PST 2006

On Wed, 22 Nov 2006 20:02:39 +0600, Michel Fortin <michel.fortin at michelf.com> wrote:

>> Let's not think of <label> with "type" attribute or any other
>> element which is introduced instead as of a visually element. It
>> should be just a way of expressing the value of "title", "alt" etc
>> with rich markup inside.

> There is already a way to express tooltips in HTML. Yeah, it's rather
> limited.

HTML is not about expressing tooltips. HTML is about expressing image titles. And yes, the HTML way of expressing image titles is rather limited.

> I'm not against new CSS properties to display things as tooltips, but I'd
> rather see that confined to custom stylesheets.

Whether the rules like label[type="title"] { display: tooltip } make it to the default stylesheet or not is a separate question. I'd rather say not.

> And reusing <label>, or even introducing a new element, to override
> attributes (especially arbitrary attributes) seems cumbersome to
> me... how do you represent that in the DOM?

It's not about overriding attributes in DOM. The markup I've shown will be represented in DOM exactly as it's spelled.

What is indeed overriden is the title of the image, in the semantical sense. Google Images, for example, would use the content of <label type="title"> instead of the title attribute.

> It is also my opinion that the title attribute, whether it allows
> rich markup or not, is not the right place for a caption. I'm
> certainly not going to use it if browsers hide captions in tooltips
> in their default stylesheets. The default stylesheet needs to be a
> reasonable fallback, and an image caption must be visible while
> glancing at the page.

I think the default stylesheet should not be different from what browsers currently have: <label> is shown, and it doesn't appear as a tooltip.

Alexey Feldgendler <alexey at feldgendler.ru>
[ICQ: 115226275] http://feldgendler.livejournal.com

More information about the whatwg mailing list