W3C home > Mailing lists > Public > www-svg@w3.org > August 2002

Re: [SVG1.0] no tspan allowed inside an anchor?

From: Jim Ley <jim@jibbering.com>
Date: Mon, 19 Aug 2002 13:30:50 -0000
Message-ID: <023e01c24784$a4891e60$ca969dc3@emedia.co.uk>
To: <www-svg@w3.org>

"Tobias Reif" <tobiasreif@pinkjuice.com>
> Jim Ley wrote:
>
>  > Yes, but that's just a minor change to the text selection rules
>  > (select
>  > all text contents of the outer text element.) it's not something
that
>  > motivates the need for tspan:
>  >
>  > <text x="1em" y="1em">Hello <tspan dx="2em"
>  > dy="2em">World</tspan></text>
>  > Would seem to be identical to:
>  >
>  > <text x="1em" y="1em">Hello <text dx="2em"
>  > dy="2em">World</text></text>
>
> I find Thomas' explanation of the reasons for tspan very sensible.
>
> A tspan ("inline", ~span) is something different from a text ("block",
> ~p/div).

DIV isn't a block element in HTML.

I also don't agree that the distinction is particularly useful in SVG,
and as it causes us the problems you've shown with the A element which
disappear if text did follow the html's DIV element.  I certainly think
it's a lot more useful to have sensible link text rather than some
supposed html crossover, and the inability to style portions of a link
differently is totally limiting in that:

Consider me wanting to link to Ian Hickson Weblog, using his style (see:
http://ln.hixie.ch ) I would use in HTML:

<a href="http://ln.hixie.ch/"><span class="domain"><span
class="subdomain">log<sub>e</sub></span><span class="dot">.</span><span
class="hixie">hixie</span><span class="dot">.</span><span
class="ch"><span class="c">c</span>h</span></span></a>

So the direct conversion of span to tspan would give me this:

<text x="100px" y="100px"><a xlink:href="http://ln.hixie.ch/">
<tspan class="domain">
 <tspan class="subdomain">ln</tspan>
 <tspan class="dot">.</tspan>
 <tspan class="hixie">hixie</tspan>
 <tspan class="dot">.</tspan>
 <tspan class="ch">  <tspan class="c">c</tspan>h</tspan>
</tspan></a>
</text>

Of course as we note that isn't valid, what would be valid is too big for
me to contemplate writing here, and leads us into problems with WCAG (
http://www.w3.org/TR/WCAG10-TECHS/#tech-divide-links ,
http://www.w3.org/TR/WCAG10-HTML-TECHS/#link-text ).

So whilst re-using the semantics of another mark-up language is helpful,
that's not what we've done we can't translate our a+span in html to
a+tspan in svg, so far from increasing understanding of SVG, we've
increased confusion by having similarly named elements be different.

If that's the only motivation for tspan, then I would certainly like to
see it removed, and have text an allowed child of text, as this link
issue makes authoring accessible content difficult. [Issue: WG - Please
acknowledge.]

Jim.
Received on Monday, 19 August 2002 09:34:17 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:23 GMT