content
content copied to clipboard
SVG xlink:href has aggressive deprecation warnings, but href doesn't work in some non-browser SVG software
MDN URL
https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/xlink:href
What specific section or headline is this issue about?
No response
What information was incorrect, unhelpful, or incomplete?
This page says to use href instead of xlink:href. This deprecation warning is also on a lot of other pages. It says that href is now fully supported by browsers and xlink:href shouldn't be used.
However, the href attribute isn't currently understood by Inkscape (https://gitlab.com/inkscape/inbox/-/issues/620), rsvg-convert, or ImageMagick. While they aren't browsers, they're the first three rasterization options listed on MDN's Tools for SVG page that I tried.
I think it's misleading to say href is fully supported just because it is in browsers, when there's lots of other SVG software -- software that MDN recommends -- that doesn't understand it yet.
What did you expect to see?
A warning that href doesn't work in some non-browser SVG software.
Do you have any supporting links, references, or citations?
No response
Do you have anything more you want to share?
No response
MDN metadata
Page report details
- Folder:
en-us/web/svg/attribute/xlink_colon_href - MDN URL: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/xlink:href
- GitHub URL: https://github.com/mdn/content/blob/main/files/en-us/web/svg/attribute/xlink_colon_href/index.md
- Last commit: https://github.com/mdn/content/commit/909c7ece968f1c0b8c9c3f881a7b4d2c5401a00e
- Document last modified: 2022-02-05T07:38:20.000Z
Hi @RogerDodger thanks a lot for opening this issue. The SVG docs you're referring to are indeed under web technologies, so compatibility in this case is specifically browser compatibility. There's more information about the scope of the documentation under What we write.
What we could do is add a note on the tools for SVG page stating that these may have non-standard behavior when parsing SVG.
Since href was supported in Inkscape since late 2022, and xlink:href is indeed (a) deprecated in the standard (b) supported on the web, I don't think any action is necessary here.