diff options
| author | Elmar Ludwig <elmar.ludwig@uni-osnabrueck.de> | 2023-03-16 15:00:56 +0000 |
|---|---|---|
| committer | David Siegfried <david.siegfried@uni-vechta.de> | 2023-03-16 15:00:56 +0000 |
| commit | aea383ff2bd1b576f091aacd105d6886c83f7d86 (patch) | |
| tree | 94eb63cdfbd655da8535fa8487d3b4210d6be693 /resources/assets/javascripts/bootstrap/tooltip.js | |
| parent | 29604e0e3cb1a2f492521a1f58d86bdd991f2fff (diff) | |
add aria role for JS tooltips, fixes #1916
Closes #1916
Merge request studip/studip!1314
Diffstat (limited to 'resources/assets/javascripts/bootstrap/tooltip.js')
| -rw-r--r-- | resources/assets/javascripts/bootstrap/tooltip.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/resources/assets/javascripts/bootstrap/tooltip.js b/resources/assets/javascripts/bootstrap/tooltip.js index c2493cf..c84042b 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(); |
