Label all svg's with descriptive <title> tag
See original GitHub issueProposed change:
- Label main
<svg>
tags with a<title>
tag, with a descriptive text of the icon.
Why make this change:
This change would help vision impaired users, by providing a descriptive text for the main icons. That way, vision impaired users get the same information as fully sighted users.
Adding this title tag within the SVG also promotes a more accessible web for the developers who are using the icons on their website.
If this is something that you want, I’ll go label all the svgs, and make a pull request that closes this issue. 😉
Reference:
From https://developer.mozilla.org/en-US/docs/Web/SVG/Element/title:
The <title> element provides an accessible, short-text description of any SVG container element or graphics element.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:5
Top Results From Across the Web
<title> — the SVG accessible name element - MDN Web Docs
The element provides an accessible, short-text description of any SVG container element or graphics element.
Read more >Accessible SVGs | CSS-Tricks
All <img> tags need the alt attribute to be valid, ... Update the title/description so that it accurately explains the image.
Read more >Accessible SVGs - University of Melbourne
According to the SVG 2.0 specification, the <title> tag provides a short alternative description for the SVG element, in a similar way to...
Read more >Accessible SVGs: Perfect Patterns For Screen Reader Users
The first group of four patterns utilizes the <img> tag linking out to an SVG file. This is a good choice for basic,...
Read more >SVG images are used more and more on the web but what ...
The best support for SVGs is to display them inline. You must use aria-labelledby as the first choice by referencing the "title" and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Closing this issue, as adding labels is likely to hinder rather than help screen reader users.
From a screen reader user at https://github.com/tailwindlabs/heroicons.com/pull/11#pullrequestreview-475830207:
Going solely off of the context of this post, if the decision to not add this feature is being decided solely because of one occasional user, I’d have to argue that the option to add
<title>
s should be available by default and it should be up to the developer(s) to choose whether to add it or not.If I then build something with
<title>
s and then my end users complain about it, it’s up to me to decide about removing it or not.