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

Add <title> or <text> Tags to SVG, for Accessibility #38

Open
WammKD opened this issue May 18, 2024 · 1 comment
Open

Add <title> or <text> Tags to SVG, for Accessibility #38

WammKD opened this issue May 18, 2024 · 1 comment

Comments

@WammKD
Copy link

WammKD commented May 18, 2024

I may've just missed how to do so but is there a way to add these as HTML tags to the SVG? title attributes aren't recognized by screen readers and the recommended method for accessible icons is to put a <title> or <text> tag within the SVG.

It'd be super useful to be able to do something like <Heroicons.gear solid title="A gear" /> and <title>A gear</title> would show up within the rendered SVG.

Attributes such as aria-label aren't a problem as they can, already, be added like any other attribute.

@mveytsman
Copy link
Owner

mveytsman commented Aug 16, 2024

Oooh, TIL

This would be great - I'd welcome a PR for it, but don't have the availability to add it myself.

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

2 participants