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.

Feature Request: Support for title attribute

See original GitHub issue

Feature request to support the title attribute. E.g. <i class="iconify" data-icon="ic:baseline-favorite-border" data-width="24px" title="Favorite"></i>

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" width="24px" height="24px" style="vertical-align: -0.125em;-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24" _ngcontent-c8="" class="iconify ng-tns-c8-0 ng-star-inserted" data-icon="ic:baseline-favorite-border" data-width="24px" title="Favorite"><path d="M16.5 3c-1.74 0-3.41.81-4.5 2.09C10.91 3.81 9.24 3 7.5 3 4.42 3 2 5.42 2 8.5c0 3.78 3.4 6.86 8.55 11.54L12 21.35l1.45-1.32C18.6 15.36 22 12.28 22 8.5 22 5.42 19.58 3 16.5 3zm-4.4 15.55l-.1.1-.1-.1C7.14 14.24 4 11.39 4 8.5 4 6.5 5.5 5 7.5 5c1.54 0 3.04.99 3.57 2.36h1.87C13.46 5.99 14.96 5 16.5 5c2 0 3.5 1.5 3.5 3.5 0 2.89-3.14 5.74-7.9 10.05z" fill="currentColor"></path></svg>

SVG element does support title. https://developer.mozilla.org/en-US/docs/Web/SVG/Element/title

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
cyberaliencommented, Aug 18, 2021

After evaluating it, I think this is a very bad idea.

Title tag doesn’t add anything special. If you need a tooltip, adding title for placeholder will keep it as attribute, so you get a tooltip. For screen readers it is recommended to use aria-label attribute. Same stuff you would use for <img> tag.

Additionally, it would require adding extra useless code to implement it. New version can be used in server side rendering, where DOM is not available, so using DOM to add text node is not an option. Proper implementation would require converting attribute to text node, escaping all special characters to prevent script injection. That’s a lot of code that will not be used by 99% of users.

1reaction
cyberaliencommented, Feb 25, 2021

Oh, ignore that. It was supposed to be moved to <title>, but it is rendered as attribute.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Feature Request: Ability to add the 'title' attribute for hyperlinks ...
Hi team, I am just wondering if it's possible to add the title tag for internal and external links? Rankmath does support this...
Read more >
Feature Request: Deaggregate Article Section Title attribute
When using Explore, the Article Section Title attribute will aggregate articles if they are from disparate sections in Help Center which share ...
Read more >
Feature request: support for "title" attribute (for tooltips) · Issue #15 ...
Any chance you could support something like fa_icon('...', title: 'tooltip ... Feature request: support for "title" attribute (for tooltips) #15.
Read more >
title - HTML: HyperText Markup Language - MDN Web Docs
Use the title attribute on an iframe to clearly identify the content of the iframe to screen readers. Open main menu.
Read more >
HTML Title attribute and values in mediabox popup(title, caption) or ...
I think it would be a nice feature, when this content is mirrored to the htm ltitle-attribute of the base picture automatically -...
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