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

Update svg accessible name guidance #53

Open
khiga8 opened this issue Dec 21, 2022 · 0 comments
Open

Update svg accessible name guidance #53

khiga8 opened this issue Dec 21, 2022 · 0 comments

Comments

@khiga8
Copy link
Collaborator

khiga8 commented Dec 21, 2022

1. Add a `<title>` inside the SVG, with the alt text/name.
2. Give the `<title>` an ID.
3. Apply `aria-labelledby` to the SVG, pointing to the ID of the `<title>` inside of it.

This approach has maximum compatibility and should be recommended above all other approaches. Not sure if we would necessarily want to flag the other approaches as errors though... 🤔

GitHub Staff-only link svg-alt-text

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