antfu-collective/sponsorkit

prefer `href` over `xlink:href`

brc-dd opened this issue · 1 comments

Clear and concise description of the problem

xlink:href was deprecated with svg 2 (around ~7 years back)

Suggested solution

on svg anchor elements it's recommended to use href instead

Alternative

No response

Additional context

browser compatibility is very slightly different -

for xlink:href - https://caniuse.com/mdn-svg_elements_a_xlink_href / https://caniuse.com/mdn-svg_elements_image_xlink_href - 96.32% usage
for href - https://caniuse.com/mdn-svg_elements_a_href / https://caniuse.com/mdn-api_svgimageelement_href - 96.37% usage

(href is slightly higher despite being standardized later is because ie11 supported it before others)

Validations

Sure, up for it. I didn't remember why I picked it at the beginning tho, but they should work the same