Skip to content

Conversation

@kousu
Copy link

@kousu kousu commented Aug 18, 2019

This makes the social icons turn into plain text links on screenreaders and text-only browsers like lynx.

Uses this method: https://css-tricks.com/a-complete-guide-to-svg-fallbacks/#fallback-inline-svg-text

{{/if}}
{{#if @config.custom.socialYoutube}}
<a href="{{@config.custom.socialYoutube}}" aria-label="Youtube">
<desc>Youtube</desc>
Copy link

@pavelloz pavelloz Sep 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<desc>Youtube</desc>
<desc>YouTube</desc>

Because LinkedIn :)

Copy link
Collaborator

@bobmitro bobmitro Sep 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An <desc> element is used incorrectly, it is a description "component" of SVG file and must be used inside e.g.:
<a href="{{@config.custom.socialPinterest}}" aria-label="Pinterest"> <svg> <desc>Pinterest</desc> <use xlink:href="{{@website.assetsUrl}}/svg/svg-map.svg#pinterest"/> </svg> </a>

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course you're right. I don't know how I made that mistake. I think I wrote it in the correct way in my own theme, then tried to backport it to the default theme and just didn't notice I was one level off.

</a>
{{/if}}
{{#if @config.custom.socialYoutube}}
<a href="{{@config.custom.socialYoutube}}" aria-label="Youtube">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<a href="{{@config.custom.socialYoutube}}" aria-label="Youtube">
<a href="{{@config.custom.socialYoutube}}" aria-label="YouTube">

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's already four spaces indented, just like the rest. Is this a typo?

This makes the social icons turn into plain text links on screenreaders and text-only browsers like lynx.

Uses this method: https://css-tricks.com/a-complete-guide-to-svg-fallbacks/#fallback-inline-svg-text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants