Re: Selecting text in a clipPath: accessibility and advice to search engines

Am 01.10.2011 um 15:18 schrieb David Dailey:

> In the first example, a pattern containing a bitmap is applied to a text string. In the second, a clipPath containing the text is applied to the image.
>  
> The first has the advantage that the text remains selectable by dragging over it (so that it can be copied to the clipboard), but the second doesn’t. (It also has the advantage of being able to stroke the text.)
>  
> Should text in a clipPath be selectable?

In my opinion clipPaths, masks and filters are pure visual effects. The SVG viewer can't assume that the content of visual effects have any context. Therefor texts that are part of visual effects should not be selectable or searchable. If the visual effect has a context that people with special needs or preferences could be interested in, the author should apply alternative texts (like the 'alt' attribute on <img>). In the case of SVG this can be done with the <title> tag.

This is of course not the case for texts where you apply visual effects like patterns or gradients. They should indeed be selectable. 

But it gets really difficult if you apply filters or clip paths on texts. In WebKit, Batik and Opera you can still select texts where you apply filters, even if you use feFlood or feOffset:

<svg xmlns="http://www.w3.org/2000/svg">
<linearGradient></linearGradient>
<filter id="filter">
<feFlood flood-color="green"/>
</filter>
<text y="100" filter="url(#filter)">ABCDEFGHIJKLMNOPQRSTUVWXYZ</text>
</svg>

But at least the last problem was not part of your question :)

Dirk

Received on Saturday, 1 October 2011 17:20:51 UTC