Re: if xlink:title= is empty and a <title> is provided should that be in the tooltip?

Hi Jonathan.

Jonathan Chetwynd:
> if xlink:title= is empty and a <title> is provided should that be in
> the tooltip?
> 
> reduced test case attached
…
> <?xml version="1.0" encoding="utf-8" standalone="no"?>
> 
> <svg xmlns="http://www.w3.org/2000/svg"
> xmlns:xlink="http://www.w3.org/1999/xlink"
> width="100%" height="100%"
> >

I think you’re misusing xlink:title="" here.  xlink:title="" gives the
title of the link it appears on.

  <svg xmlns="http://www.w3.org/2000/svg"
       xmlns:xlink="http://www.w3.org/1999/xlink">
    <a xlink:href="http://www.w3.org/"
       xlink:title="The World Wide Consortium home page">
      <title>W3C logo</title>
      <path d="..."/>
    </a>
  </svg>

Here, the xlink:title="" gives a title for http://www.w3.org/.
The <title> gives a title for the graphical content.

Also, the spec doesn’t require that a <title> element be shown as a
tooltip.  It says:

  When the current SVG document fragment is rendered as SVG on visual
  media, 'desc' and 'title' elements are not rendered as part of the
  graphics. User agents may, however, for example, display the 'title'
  element as a tooltip, as the pointing device moves over particular
  elements. Alternate presentations are possible, both visual and aural,
  which display the 'desc' and 'title' elements but do not display
  'path' elements or other graphics elements.

Basically, the UA can do whatever it likes with it.

-- 
Cameron McCormack, http://mcc.id.au/
 xmpp:heycam@jabber.org  ▪  ICQ 26955922  ▪  MSN cam@mcc.id.au

Received on Tuesday, 15 January 2008 11:51:58 UTC