Re: SVG 1.2 13.1 tooltips

On Wed 16 Jul 2003, Jim Ley wrote:

> I thought I'd start it off with a simple one, which I'm sure the SVG WG
> predicted.
> 
> Tooltips, I'm unhappy with the current syntax, since it does not provide a
> mechanism to have a tooltip which is not a title for the element, for
> example, I may want to provide some instructional text, rather than a title
> appearing on tooltip, for example perhaps a "click me to see my dance"
> advice on a cartoon bear, the title for the bear element would be "Dancing
> Bear" or something, but that's not what I want to see.

We had a long discussion about this. The original proposal
had a psuedo CSS element ::tooltip which could be styled to
reference whatever content you desired using xpath.

For example:

circle::tooltip {
  background: yellow;
  /* content is <title> by default */
}

dancingbear::tooltip {
  content: xpath(./jim:hint);
}

We decided that being able to style tooltips was too much
(and there is vague wording about floating graphical windows in
the tooltip section which may eventually provide this feature).

The ability to specify what a tooltip uses for content also fell
away at that time. Also, XPath was considered too much of a burden for
Tiny devices.

Dean


> 
> It would not be semantically correct, or desirable, to use the title element
> for the advisory text (some people may use the title element for the wrong
> purpose to achieve this effect).
> 
> To resolve this, I would have 1 of 2 methods:
> 
> A HINT element, which would be exactly like the TITLE element but contain
> hints :-)
> 
> <g id="bear">
>  <title>Dancing Bear</title>
>  <hint>Click me to see me dance</hint>
>  ...
> </g>
> 
> or I would like a tooltip-ref attribute which was a pointer to the text to
> use (like tref) so you'd get:
> 
> <g id="bear" tooltip-ref="#titleel">
>  <title>Dancing Bear</title>
>  <hint xmlns:"urn:foo" id="titleel">Click me to see me dance</hint>
>  ...
> </g>
> 
> I prefer the 2nd one, since the default behaviour could be exactly as
> currently specified in the draft, but for those of us who want to popup
> instructions or things other than the title, we can easily do it.
> 
> Cheers,
> 
> Jim.
> 
> 

Received on Tuesday, 15 July 2003 21:11:03 UTC