aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMoritz Strohm <strohm@data-quest.de>2024-05-28 15:22:18 +0000
committerMoritz Strohm <strohm@data-quest.de>2024-05-28 15:22:18 +0000
commit062a7f9a03ae39ed083f42d89681318fb0cd6321 (patch)
tree5b34b8475474a87862dc26e6d65a1adddd4679e5 /lib
parentd28f3aff4a6cf4e55e070015106948b720076bef (diff)
fixed screen reader output for tooltips, fixes #3962issue-4224-2issue-4224
Closes #3962 Merge request studip/studip!2859
Diffstat (limited to 'lib')
-rw-r--r--lib/visual.inc.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/visual.inc.php b/lib/visual.inc.php
index 86efbfb..9dca1d1 100644
--- a/lib/visual.inc.php
+++ b/lib/visual.inc.php
@@ -596,7 +596,12 @@ function tooltipIcon($text, $important = false, $html = false): string
// render tooltip
$template = $GLOBALS['template_factory']->open('shared/tooltip');
- return $template->render(compact('text', 'important', 'html'));
+ return $template->render([
+ 'text' => $text,
+ 'important' => $important,
+ 'html' => $html,
+ 'tooltip_id' => md5($text)
+ ]);
}
/**
@@ -608,9 +613,13 @@ function tooltipIcon($text, $important = false, $html = false): string
function tooltipHtmlIcon($text, $important = false)
{
// render tooltip
- $html = true;
$template = $GLOBALS['template_factory']->open('shared/tooltip');
- return $template->render(compact('text', 'important', 'html'));
+ return $template->render([
+ 'text' => $text,
+ 'important' => $important,
+ 'html' => true,
+ 'tooltip_id' => md5($text)
+ ]);
}
/**