Advertisement in svg output
See original GitHub issueHey! Today we set out to upgrade our version of @tabler/icons from 1.41.2 to 1.68.0.
It seemed legit from the changelog. But our snapshot tests failed. When I inspected I found this in every snapshot that rendered an icon:
+ <desc>
+ Download more icon variants from https://tabler-icons.io/i/calendar-event
+ </desc>
This is quite a significant change since it adds bloat to a site with a lot of icons. But I can’t find any documentation around why or when this was added. It seems to have been released with v1.67.1, but there’s no notion about this change in the release notes.
By searching through the history I found that it was added in 596547f06749698b37ab8dfafc2a17b19a81f74f which was pushed directly to master
, without a corresponding PR.
I get that you want to advertise the work you do for free, work which is very valuable to us, and I can’t blame you, we can fork. But I just feel that this should have been communicated somehow.
Can you provide your reasoning behind this kind of change?
Issue Analytics
- State:
- Created a year ago
- Reactions:15
- Comments:5 (3 by maintainers)
i’ve removed advertisement in newest release 😃
Could HTML comments like
<!-- Download more icon variants from https://tabler-icons.io/i/calendar-event -->
be an acceptable alternative? Though that would probably only work with SVG files, not with React components etc.Another potential issue: if a page contains many icons, the page will then contain many instances of the “Download more icon variants from tabler-icons.io” text. Is it possible that Googlebot interprets this as spam? 🤔 Especially since the texts are “hidden” in the
<desc>
elements. No idea, just thinking.Two thoughts for the accessibility issue until it’s properly fixed:
aria-hidden="true"
(and in my experience icons often have this attribute), do screen readers still announce the<desc>
element?aria-hidden="true"
for some reason, can the<desc>
element be hidden with CSS? Something like.icon-tabler desc { display: none; }
. Would screen readers then ignore the<desc>
element?