Most of the time, SVG elements are used for icons in an interactive element such as a button or a link. Just like the ability to strip empty tags, it would be nice to have a way to strip SVGs to their barebone structure (i.e. just the svg element itself, none of its innards). Take the following example as currently stripped by your tool:
<a href="…" rel="home"><svg id="wh-oval-nofill-917" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 343 243" xml:space="preserve"><style type="text/css">...</style><g></g></svg></a>
Having an option to reduce it to this barebone content would be handy:
<a href="…" rel="home"> <svg>...</svg> </a>
In this case I wanted to point out that the link lacked an accessible name and I wanted to quickly show how to plug in a visually hidden span inside of the link right before the svg.
Keep up the good work!
Most of the time, SVG elements are used for icons in an interactive element such as a button or a link. Just like the ability to strip empty tags, it would be nice to have a way to strip SVGs to their barebone structure (i.e. just the svg element itself, none of its innards). Take the following example as currently stripped by your tool:
<a href="…" rel="home"><svg id="wh-oval-nofill-917" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 343 243" xml:space="preserve"><style type="text/css">...</style><g></g></svg></a>Having an option to reduce it to this barebone content would be handy:
<a href="…" rel="home"> <svg>...</svg> </a>In this case I wanted to point out that the link lacked an accessible name and I wanted to quickly show how to plug in a visually hidden span inside of the link right before the svg.
Keep up the good work!