danawoodman/react-fontawesome

Title not appearing in Chrome

Closed this issue · 5 comments

Sometimes it's helpful to put title's on icons to provide helpful tips on hover. I just realized react-fontawesome doesn't support the title attribute.

Actually, it does since we just pass any unknown props to the component. Give it a shot and if it doesn't work, reopen!

Actually, the title attribute is not supported on SVG elements in Chrome. You're right, the title attribute is rendered in the DOM, but chrome doesn't do anything with it, so you can't see it. The proper way to do it (if someone feels so inclined) is to inject a <title> element inside the <svg> tag.

I’m confused. You’re mentioning SVG but this library doesn’t support the new FA SVG icons. Are you sure you’re not confusing this library with the official FA React Component?

My apologies, I was confused this with the fortawesome/react-fontawesome repo.

Haha, no worries, that's what I thought 😉

Have a good weekend 🕺