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 (#1809)
  • Loading branch information
BC-tymurbiedukhin authored Oct 2, 2020
1 parent a455939 commit b2dde53
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 12 deletions.
5 changes: 2 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# Changelog

##next draft
- State of search link not announced. [#1798](https://github.com/bigcommerce/cornerstone/pull/1798)

## Draft
- Face accessibility standards with social links on PDP's page. [#1809](https://github.com/bigcommerce/cornerstone/pull/1809)
- State of search link not announced. [#1798](https://github.com/bigcommerce/cornerstone/pull/1798)

## 4.10.0 (10-01-2020)
- Return heading to product card. [#1848](https://github.com/bigcommerce/cornerstone/pull/1848)
Expand Down
1 change: 1 addition & 0 deletions assets/scss/components/foundation/modal/_modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
&:before {
content: " ";
position: absolute;
right: 0;
top: 50%;
border-width: remCalc(10px);
border-style: solid;
Expand Down
7 changes: 7 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,13 @@
}
// scss-lint:enable NestingDepth,
}

& .socialLinks__link {
position: relative;
height: 2rem;

@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 b2dde53

Please sign in to comment.