diff --git a/resources/assets/javascripts/bootstrap/tooltip.js b/resources/assets/javascripts/bootstrap/tooltip.js index c2493cf745606ff11c3a8110df0ad516878964a4..c84042b82534486b0700efea51f1fad77c4396bb 100644 --- a/resources/assets/javascripts/bootstrap/tooltip.js +++ b/resources/assets/javascripts/bootstrap/tooltip.js @@ -35,12 +35,13 @@ $(document).on('mouseenter mouseleave focusin focusout', '[data-tooltip],.toolti if (!content) { content = $(this).find('.tooltip-content').remove().html(); } - $(this).attr('title', ''); + $(this).attr('title', null); $(this).attr('data-tooltip', content); tooltip = new STUDIP.Tooltip(x, y, content); data.tooltipObject = tooltip; + $(this).attr('aria-describedby', tooltip.id); $(this).on('remove', function() { tooltip.remove(); diff --git a/resources/assets/javascripts/lib/tooltip.js b/resources/assets/javascripts/lib/tooltip.js index 5ae28edfd203d02a7c34f065d942e5066841a7f7..2cdac27be88aaa69b6fa0cdba5cfae2af8e9c826 100644 --- a/resources/assets/javascripts/lib/tooltip.js +++ b/resources/assets/javascripts/lib/tooltip.js @@ -66,6 +66,7 @@ class Tooltip { this.element = $('<div>'); this.element.addClass(css_class || 'studip-tooltip'); this.element.attr('id', this.id); + this.element.attr('role', 'tooltip'); this.element.appendTo('body'); // Set position and content and paint the tooltip