Skip to content
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

Feature request: add or update <title> child node #3

Open
apiontek opened this issue Nov 2, 2023 · 0 comments
Open

Feature request: add or update <title> child node #3

apiontek opened this issue Nov 2, 2023 · 0 comments

Comments

@apiontek
Copy link

apiontek commented Nov 2, 2023

Thanks for this module, it works great and is really useful.

For accessibility & hover-text, a <title> tag inside an <svg> is very useful. It can be set in the .svg files ahead of time, but I've encountered several cases where it would be preferable to vary the <title> inner text. To that end, it'd be a great additional feature to be able to provide an attr to update or insert the top-level <title> node, something like:

<.svg name="backspace" title_tag="Clear input" />

Resulting in something like:

<svg ...><title>Clear input</title>...</svg>

And if the SVG already contains a <title> it should replace it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant