Skip to content
Snippets Groups Projects

Added div wrapper with role and label to the back to top button.

1 file
+ 2
1
Compare changes
  • Side-by-side
  • Inline
+ 2
1
@@ -3,8 +3,9 @@
attach: function (context, settings) {
var exist = $('#backtotop').length;
if (exist == 0) {
let aria_label = Drupal.t("Back to top");
$("body", context).once('backtotop').each(function () {
$('body').append("<button id='backtotop'>" + settings.back_to_top.back_to_top_button_text + "</button>");
$('body').append("<div role='navigation' aria-label='" + aria_label + "'><button id='backtotop' aria-label='" + aria_label + "'>" + settings.back_to_top.back_to_top_button_text + "</button></div>");
});
}
Loading