Re: Whether to display inner or outermost <title>?

Jonathan, do you think it would it be reasonable for us, as part of the SVG
IG, to put together recommendations that we can then forward to the WG -
what do you think?

Dear WG,

 I believe Jonathan has a valid concern.  The use case is as follows:

<defs>
  <symbol id="apple">
    <title>apple</title>
  </symbol>

  <symbol id="banana">
    <title>banana</title>
  </symbol>

  <symbol id="orange">
    <title>orange</title>
  </symbol>

  <symbol id="fruit">
    <title>fruit</title>
    <use xlink:href="#apple" transform="..." />
    <use xlink:href="#banana" transform="..." />
    <use xlink:href="#orange" transform="..." />
  </symbol>
</defs>

<use xlink:href="#apple" />
<use xlink:href="#banana" />
<use xlink:href="#orange" />
<use xlink:href="#fruit" />

Displaying all four symbols, we would like to have the tooltips be:  apple,
banana, orange, fruit respectively.  However, it seems like with the last
symbol (which is actually a collection of previous symbols) that if you
hover over the apple within the fruit symbol that you'd get the 'apple'
tooltip.

It seems like if the browsers always displayed the innermost title (as Opera
currently does), that you'd be forced to do something hacky like this:

<defs>
  <!-- no title elements on these -->
  <symbol id="apple-impl">...</symbol>
  <symbol id="banana-impl">...</symbol>
  <symbol id="orange-impl">...</symbol>

  <symbol id="apple">
    <title>apple</title>
    <use xlink:href="#apple-impl" />
  </symbol>

  <symbol id="banana">
    <title>banana</title>
    <use xlink:href="#banana-impl" />
  </symbol>

  <symbol id="orange">
    <title>orange</title>
    <use xlink:href="#orange-impl" />
  </symbol>

  <symbol id="fruit">
    <title>fruit</title>
    <use xlink:href="#apple-impl" transform="..." />
    <use xlink:href="#banana-impl" transform="..." />
    <use xlink:href="#orange-impl" transform="..." />
  </symbol>
</defs>

Is there any better way?  Jonathan, can you test this?

2) If the following is done referencing the above defs, what should the
tooltip be:

<use xlink:href="#apple">
  <title>granny smith</title>
</use>

In this case, does the <use> element's title override any titles in its
shadow content?

Basically the questions boil down to - which title elements should the user
agents interoperably display for a tooltip when hovering over elements?

Regards,
Jeff

On 7/8/08, Jonathan Chetwynd <j.chetwynd@btinternet.com> wrote:
>
> Whether to display inner or outermost <title>?
>
> I believe it might be helpful for the SVGWG to consider and possibly agree
> and define the behaviour for this issue:
>
> There appear to be two simple possibilities either:
>
> the innermost element being hovered should have its title content displayed
> as a tooltip
> or
> the outermost element being hovered should have its  title content
> displayed as a tooltip
>
> the example given is an illustration of the word 'fruit' as used here:
> http://www.openicon.org/icon-ark/mulberry/fruit.svgz
>
> Our users have enormous difficulty with generalisations and would benefit
> from adoption of the latter course.
>
> there is no simple means once the innermost elements are titled, of titling
> the group - fruit.
> whereas in the outermost case, one has no necessity to label the group, and
> any parts one wishes to retain their title may be left out of the group.
>
> it seems clear to me that <use> is the defining case, as in other cases the
> author is in general able to adapt the content to suit their purpose.
>
> regards
>
>   <http://www.openicon.org>
>
> Jonathan Chetwynd
>
> j.chetwynd@btinternet.com
> http://www.openicon.org/
>
> +44 (0) 20 7978 1764
>
> http://www.w3.org/TR/SVG-access/#Equivalent
>
> title
> Provides a human-readable title for the element that contains it. The title
> element may be rendered by a graphical user agent as a tooltip. It may be
> rendered as speech by a speech synthesizer.
>
> http://www.w3.org/TR/SVGMobile12/struct.html#DescriptionAndTitleElements
>
> 5.5 The 'desc' and 'title' elements
>
> Each container element or graphics element in an SVG document may supply a
> 'desc' and may also supply a 'title' description. The 'desc' element
> contains a detailed description for the container or graphics element
> containing it. This description should be usable as replacement content for
> cases when the user cannot see the rendering of the SVG element for some
> reason. The 'title' element contains a short title for the container or
> graphics element containing it. This short title provides information
> supplementary to the rendering of the element, but is not sufficient to
> replace it. These are typically text, but can be content in other markup
> languages (see foreign namespaces). 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. SVG 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. For deep hierarchies, and for
> following use element references, it is sometimes desirable to allow the
> user to control how deep they drill down into descriptive text.
>
> http://www.w3.org/Graphics/SVG/IG/wiki/Accessibility_Activity#Assumptions
> SVGIG wiki discussion on this topic...
>

Received on Tuesday, 8 July 2008 21:10:37 UTC