question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Label all svg's with descriptive <title> tag

See original GitHub issue

Proposed 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:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:5

github_iconTop GitHub Comments

2reactions
HonkingGoosecommented, Aug 26, 2020

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:

As an occasional user of a screenreader, I’d suggest not adding this. Unlike images, svg titles are optional, and in this case adding them would just add more noise to the page, rather than providing any useful information.

0reactions
gflujancommented, Aug 25, 2022

Closing this issue, as adding labels is likely to hinder rather than help screen reader users.

From a screen reader user at tailwindlabs/heroicons.com#11 (review):

As an occasional user of a screenreader, I’d suggest not adding this. Unlike images, svg titles are optional, and in this case adding them would just add more noise to the page, rather than providing any useful information.

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found