-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SVG hyperlink support #57
Comments
I can PR this but wanted to open for discussion first before surprise! |
😅 Not sure if I get the correct idea, would you give an example usage of this? |
@amio Using embed and object tags to embed svg within a page allows for more advanced svg.
This includes providing an icon via a url and not svg, or adding support for hyperlinks within the badge itself. A use case can be something like the github badges where it automatically embeds in the svg a link to the github project. Then when hosted within a page using embed or object, the link is auto generated and included rather than having to wrap the image itself in a link. With that said, while playing around quite a bit the actual scenarios to be able to leverage this are so narrow that perhaps it isn't worth the effort. Most markdown sanitizes object and embed away so it leaves only manual html usage as a target. I'm starting to think the this small use case isn't worth the effort. |
Agreed, sanitizers would be an issue to this in real world use cases. While supporting |
I'm going to chime with some accessibility tips for when this gets implemented since I just implemented some a11y changes to shields, which has link support.
See: badges/shields#5289 |
Query param options to specify an overall link for the entire badge or split links for left and right. For dynamically generated tags, this will make usage from an object or embed element easier without having to further wrap img usage of the svg with another link as the link can be generated for you.
The text was updated successfully, but these errors were encountered: