W3C home > Mailing lists > Public > www-svg@w3.org > January 2008

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

From: Cameron McCormack <cam@mcc.id.au>
Date: Tue, 15 Jan 2008 22:51:45 +1100
To: www-svg List <www-svg@w3.org>
Message-ID: <20080115115145.GI16526@arc.mcc.id.au>

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"
    <a xlink:href="http://www.w3.org/"
       xlink:title="The World Wide Consortium home page">
      <title>W3C logo</title>
      <path d="..."/>

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

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:12 UTC