angular-mdc-web icon indicating copy to clipboard operation
angular-mdc-web copied to clipboard

Icon font names are getting indexed by search engines

Open zunamo opened this issue 6 years ago • 2 comments

Material icon font names are getting indexed by search engines.

The issue is described here: https://github.com/google/material-design-icons/issues/498

This template in my app: <mdc-icon>format_list_bulleted</mdc-icon> <span>Compare</span>

Is getting translated in this manner in google search results: chrome_0Rk7FtcWAL

In one of the answers in the link above, it is suggested to use material icon codepoints. Would it be possible to add a way to automatically translate mdc-icon font text to a code point?

Suggestion: <mdc-icon useCodePoint>search</mdc-icon> or <mdc-icon toCodePoint="search"></mdc-icon>

Or a different solution that would solve this issue would also be great. Thanks in advance!

zunamo avatar Apr 03 '19 17:04 zunamo

This is another option to solve this problem: https://stackoverflow.com/questions/37281861/how-to-use-google-material-icons-as-class-instead-of-i-tag

I am thinking of going with this now:

HTML: <mdc-icon attr.data-icon="search"></mdc-icon>

CSS: mdc-icon::after { content: attr(data-icon); }

Could you let me know if this is something you are thinking of implementing? If not, I will just change all my mdc-icons to work in this manner.

zunamo avatar Apr 09 '19 20:04 zunamo

@zunamo Thank you for bringing this to my attention. I'm preparing to publish our v1.0.0 release, but afterwards I'd like to investigate this for ya.

trimox avatar Apr 10 '19 00:04 trimox