W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2006

[whatwg] The IMG element, proposing a CAPTION attribute

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Sun, 19 Nov 2006 20:35:57 -0800
Message-ID: <002301c70c5d$648b96b0$3401a8c0@TERRA>
Please see below,

----- Original Message ----- 
From: "Matthew Raymond" <mattraymond@earthlink.net>
Subject: Re: [whatwg] The IMG element, proposing a CAPTION attribute


| Alexey Feldgendler wrote:
| > On Wed, 15 Nov 2006 09:42:11 +0600, Matthew Paul Thomas 
<mpt at myrealbox.com>
wrote:
| >
| >>> I believe HTML should have an element for every attribute intended to
| >>> hold human-readable text. A raw idea can go like this:
| >>>
| >>> <img id="img1" src="...">
| >>> <label for="img1" type="title">...</label>
| >>>
| >>> Here, <label> holds a value which should be treated the same way like
| >>> the title attribute on <img>, except that it can contain nested
| >>> markup. This would be useful for all attributes defined as %Text in
| >>> HTML -- in HTML4, these are ABBR, ALT, LABEL, STANDBY, SUMMARY, TITLE.
| >
| >> You would need to stipulate that title= couldn't contain any <a>
| >> elements. A link in a tooltip would usually be impossible to click. :-)
| >
| > Maybe, or maybe not. I'd say "not recommended" because not all ways of
rendering
| > such "labels" allow clicking links and other interactive elements like
inputs.
|
|   I don't see the point of replacing attribute-based tooltips with
| elements. Many platforms/OSes don't have tooltips that support anything
| other than text. If you really want to replace text tooltips with
| elements that support HTML content, you might as well go all the way and
| allow people to use it as a means of creating popup content. Once you go
| down that road, people will be asking for it anyways.

"...Many platforms/OSes don't have tooltips that support anything
other than text...."

How task of tooltip creation in HTML is related to what OS is using for
tooltips?

As an example: here is a screenshot of HTML/CSS defined
tooltip in HTMLayout:
http://www.terrainformatica.com/htmlayout/images/tooltip-balloon.jpg
as you may see this is far from what OS is using.

For formatted tooltips HTMLayout (http://www.terrainformatica.com/htmlayout)
uses 'titleid' attribute that contains id of the element to show as a 
tooltip.

So if you have <span titleid="mytooltip">Bold</span>
and <div id="mytooltip">Rich content</div>
then that div will be shown as a tooltip for the span.

Pretty natural I would say.

For various popup purposes I have added <popup> element that is
display:none normally and has better semantic meaning so
we use <popup>s for such tooltips in almost all cases.

|
|   As for using <label> for this, I don't think overloading <label> is
| the best solution. The <label> element is fine for things like captions,
| which are arguably the same thing as labels. Tooltips are not labels,
| and the fact that a control can have a tooltip and a label would only
| make this more confusing. What would you do with this?...
|
|| <label for="img1" type="title">...</label>
|| <input id="img1" [...]>
|

Andrew Fedoniouk.
http://terrainformatica.com
Received on Sunday, 19 November 2006 20:35:57 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:49 UTC