FIX: missing titles and aria-labels on sharing links
This commit is contained in:
parent
4f53b85ee2
commit
4191d97d48
|
@ -19,12 +19,14 @@ export default {
|
|||
return "http://twitter.com/intent/tweet?url=" + encodeURIComponent(link) + "&text=" + encodeURIComponent(title);
|
||||
},
|
||||
shouldOpenInPopup: true,
|
||||
title: I18n.t('share.twitter'),
|
||||
popupHeight: 265
|
||||
});
|
||||
|
||||
Sharing.addSource({
|
||||
id: 'facebook',
|
||||
faIcon: 'fa-facebook-square',
|
||||
title: I18n.t('share.facebook'),
|
||||
generateUrl: function(link, title) {
|
||||
return "http://www.facebook.com/sharer.php?u=" + encodeURIComponent(link) + '&t=' + encodeURIComponent(title);
|
||||
},
|
||||
|
@ -34,6 +36,7 @@ export default {
|
|||
Sharing.addSource({
|
||||
id: 'google+',
|
||||
faIcon: 'fa-google-plus-square',
|
||||
title: I18n.t('share.google+'),
|
||||
generateUrl: function(link) {
|
||||
return "https://plus.google.com/share?url=" + encodeURIComponent(link);
|
||||
},
|
||||
|
@ -44,6 +47,7 @@ export default {
|
|||
Sharing.addSource({
|
||||
id: 'email',
|
||||
faIcon: 'fa-envelope-square',
|
||||
title: I18n.t('share.email'),
|
||||
generateUrl: function(link, title) {
|
||||
return "mailto:?to=&subject=" + encodeURIComponent('[' + Discourse.SiteSettings.title + '] ' + title) + "&body=" + encodeURIComponent(link);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<a href {{action "share" source}} {{bind-attr title="title"}}>
|
||||
<a href {{action "share" source}} title="{{unbound source.title}}" aria-label="{{unbound source.title}}" >
|
||||
{{#if source.faIcon}}
|
||||
<i {{bind-attr class=":fa source.faIcon"}}></i>
|
||||
{{else}}
|
||||
|
|
Loading…
Reference in New Issue