fix(frontend): make icon tooltips work again

This commit is contained in:
sam 2023-09-13 15:41:01 +02:00
parent dd9c9c442c
commit 636ee7369d
No known key found for this signature in database
GPG Key ID: B4EF20DDE721CAA1
1 changed files with 4 additions and 2 deletions

View File

@ -15,9 +15,11 @@
$: currentPreference = $: currentPreference =
status in mergedPreferences ? mergedPreferences[status] : defaultPreferences.missing; status in mergedPreferences ? mergedPreferences[status] : defaultPreferences.missing;
let iconElement: HTMLElement; let iconElement: HTMLSpanElement;
</script> </script>
<Icon aria-hidden name={currentPreference.icon} class={className} /> <span bind:this={iconElement} aria-hidden>
<Icon name={currentPreference.icon} class={className} />
</span>
<span class="visually-hidden">{currentPreference.tooltip}:</span> <span class="visually-hidden">{currentPreference.tooltip}:</span>
<Tooltip aria-hidden target={iconElement} placement="top">{currentPreference.tooltip}</Tooltip> <Tooltip aria-hidden target={iconElement} placement="top">{currentPreference.tooltip}</Tooltip>