Remove description for screen readers
It was being duplicated when restoring a page by using browser history. With this solution we will avoid to have screen readers descriptions more than once inside any sociual share button.
This commit is contained in:
@@ -173,6 +173,7 @@ var destroy_non_idempotent_modules = function() {
|
||||
App.Datepicker.destroy();
|
||||
App.HTMLEditor.destroy();
|
||||
App.LegislationAnnotatable.destroy();
|
||||
App.SocialShare.destroy();
|
||||
};
|
||||
|
||||
$(document).on("turbolinks:load", initialize_modules);
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
$(".social-share-button a").each(function() {
|
||||
$(this).append("<span class='show-for-sr'>" + ($(this).data("site")) + "</span>");
|
||||
});
|
||||
},
|
||||
destroy: function() {
|
||||
$(".social-share-button a .show-for-sr").remove();
|
||||
}
|
||||
};
|
||||
}).call(this);
|
||||
|
||||
Reference in New Issue
Block a user