Skip to content

Commit

Permalink
fix(storefront): BCTHEME-198 Face accessibility standards with social…
Browse files Browse the repository at this point in the history
… links on PDP's page
  • Loading branch information
BC-tymurbiedukhin committed Aug 31, 2020
1 parent cea4c32 commit bc566fd
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 10 deletions.
2 changes: 1 addition & 1 deletion assets/scss/components/foundation/modal/_modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
&:before {
content: " ";
position: absolute;
top: 50%;
top: 0.25rem;
border-width: remCalc(10px);
border-style: solid;
border-color: transparent transparent $adminBar-tooltip-bg-backgroundColor transparent;
Expand Down
6 changes: 6 additions & 0 deletions assets/scss/components/stencil/socialLinks/_socialLinks.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@
}
// scss-lint:enable NestingDepth,
}

& .socialLinks__link {
position: relative;

@include addFocusTooltip;
}
}


Expand Down
23 changes: 14 additions & 9 deletions templates/components/common/share.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
<ul class="socialLinks">
{{#each settings.add_this.buttons}}
<li class="socialLinks-item socialLinks-item--{{service}}">
<a class="addthis_button_{{service}} icon icon--{{service}}" {{{annotation}}}>
<a class="addthis_button_{{service}} socialLinks__link icon icon--{{service}}"
title="{{{capitalize service}}}"
href="#"
{{{annotation}}}
>
<span class="aria-description--hidden">{{{capitalize service}}}</span>
{{#if service '===' 'facebook'}}
<svg>
<use xlink:href="#icon-facebook"/>
Expand Down Expand Up @@ -40,7 +45,7 @@
</ul>
<script type="text/javascript"
defer src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-4e94ed470ee51e32"></script>
<script>
<script>
window.addEventListener('DOMContentLoaded', function() {
if (typeof(addthis) === "object") {
addthis.toolbox('.addthis_toolbox');
Expand All @@ -50,12 +55,12 @@
</div>
{{/if}}
{{#if settings.facebook_like_button.enabled}}
<iframe
class="facebook{{#if settings.facebook_like_button.verb '===' 'recommend'}}Recommend{{else}}Like{{/if}}Btn"
style="border:none; overflow:hidden; margin: 0; padding: 0; position:absolute"
src="https://www.facebook.com/plugins/like.php?href={{settings.facebook_like_button.href}}&amp;layout=button_count{{#if settings.facebook_like_button.verb '===' 'recommend'}}&amp;action=recommend{{/if}}&amp;colorscheme=light&amp;height=20"
scrolling="no"
frameborder="0"
<iframe
class="facebook{{#if settings.facebook_like_button.verb '===' 'recommend'}}Recommend{{else}}Like{{/if}}Btn"
style="border:none; overflow:hidden; margin: 0; padding: 0; position:absolute"
src="https://www.facebook.com/plugins/like.php?href={{settings.facebook_like_button.href}}&amp;layout=button_count{{#if settings.facebook_like_button.verb '===' 'recommend'}}&amp;action=recommend{{/if}}&amp;colorscheme=light&amp;height=20"
scrolling="no"
frameborder="0"
allowTransparency="true">
</iframe>
{{/if}}
{{/if}}

0 comments on commit bc566fd

Please sign in to comment.