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

Re: script tags fire in a switch element

From: Dr. Olaf Hoffmann <Dr.O.Hoffmann@gmx.de>
Date: Fri, 17 Jan 2014 15:17:22 +0100
To: www-svg@w3.org, mcelam@google.com
Message-Id: <201401171517.22439.Dr.O.Hoffmann@gmx.de>
Hello,

if you put your script element into a g element, you do not have
to worry about validation and the g does not change the switching
behaviour and if required you can put more elements into the g.

Concerning the lack of animation capabilities in MSIE or maybe some
other browsers you have several options.
However you should always have a good text alternative in title and desc
of the root svg element. Reading this, the audience can always understand,
what is intended.

And if animation matters and there is no graphical alternative without,
you can add some text to the file, explaining that animation support is
required for understanding, due to a bug or gaps this seems not to be
available in the used viewer, but one can read title and desc to get
a text alternative. With a set or animate element you can remove this,
in case animation works. This is a more advanced feature selection
than switch, because you use the same feature to remove the hint or
warning as is required for your content.

Or you can put all your animation related content into one g element
and a hint about no animation into another and both into the switch
with the required feature.

With tref you can reuse text from title and desc to display this directly
with graphical text elements as an alternative for the animated content
(but you have to ensure, that related viewers not interpreting animation
interprete tref for this approach). Doing this, the audience does not
have to switch to the alternative text view manually in case of bugs and
gaps of the viewer. 

Obviously, if you embed the SVG or reference it from other files, you
can provide a hint as well, that interpretation of animation is required
for the file - and if you like, you can add a collection of viewers, that do
the job properly, to facilitate the audience to find and install better 
software than they currently use.

But your test file only contains a static red square, no animation at all,
therefore it is not obvious, what you want to do with it and if there
is a way without animation - respectively I can see the red rectangle
with and without animation capabilities, it simply does nothing else -
why to require the animation feature for this?

Olaf
Received on Friday, 17 January 2014 14:17:51 UTC

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