feat: tooltip aria label

This commit is contained in:
Timothy J. Baek 2024-03-04 13:58:39 -08:00
parent 2d59847fb9
commit 475105473c
2 changed files with 15 additions and 12 deletions

View file

@ -29,6 +29,6 @@
});
</script>
<div bind:this={tooltipElement}>
<div bind:this={tooltipElement} aria-label={content}>
<slot />
</div>

View file

@ -34,10 +34,11 @@
import Sidebar from '$lib/components/layout/Sidebar.svelte';
import ShortcutsModal from '$lib/components/chat/ShortcutsModal.svelte';
import ChangelogModal from '$lib/components/ChangelogModal.svelte';
import Tooltip from '$lib/components/common/Tooltip.svelte';
let ollamaVersion = '';
let loaded = false;
let showShortcutsButtonElement:HTMLButtonElement
let showShortcutsButtonElement: HTMLButtonElement;
let DB = null;
let localDBChats = [];
@ -201,6 +202,7 @@
{#if loaded}
<div class=" hidden lg:flex fixed bottom-0 right-0 px-3 py-3 z-10">
<Tooltip content="help" placement="left">
<button
id="show-shortcuts-button"
bind:this={showShortcutsButtonElement}
@ -211,6 +213,7 @@
>
?
</button>
</Tooltip>
</div>
<ShortcutsModal bind:show={showShortcuts} />