Skip to content

Commit

Permalink
Add role tooltip to all tooltip poppers
Browse files Browse the repository at this point in the history
  • Loading branch information
CronkCode committed Sep 10, 2024
1 parent 997076a commit 59d359f
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 13 deletions.
10 changes: 6 additions & 4 deletions src/ui/UserPortal/components/ChatInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="tooltip-component">
<VTooltip :auto-hide="isMobile" :popper-triggers="isMobile ? [] : ['hover']">
<i class="pi pi-info-circle" tabindex="0" @keydown.esc="hideAllPoppers"></i>
<template #popper> Use Shift+Enter to add a new line </template>
<template #popper role="tooltip"><div role="tooltip">Use Shift+Enter to add a new line</div></template>
</VTooltip>
</div>
<VTooltip :auto-hide="isMobile" :popper-triggers="isMobile ? [] : ['hover']">
Expand All @@ -19,9 +19,11 @@
@keydown.esc="hideAllPoppers"
/>
<template #popper>
Attach files ({{
fileArrayFiltered.length === 1 ? '1 file' : fileArrayFiltered.length + ' files'
}})
<div role="tooltip">
Attach files ({{
fileArrayFiltered.length === 1 ? '1 file' : fileArrayFiltered.length + ' files'
}})
</div>
</template>
</VTooltip>
<Dialog
Expand Down
6 changes: 4 additions & 2 deletions src/ui/UserPortal/components/ChatMessage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
$filters.timeAgo(new Date(message.timeStamp))
}}</span>
<template #popper>
{{ formatTimeStamp(message.timeStamp) }}
<div role="tooltip">
{{ formatTimeStamp(message.timeStamp) }}
</div>
</template>
</VTooltip>

Expand All @@ -48,7 +50,7 @@
@click.stop="handleCopyMessageContent"
@keydown.esc="hideAllPoppers"
/>
<template #popper>Copy Message</template>
<template #popper><div role="tooltip">Copy Message</div></template>
</VTooltip>
</span>
</div>
Expand Down
12 changes: 7 additions & 5 deletions src/ui/UserPortal/components/ChatSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
@click="$appStore.toggleSidebar"
@keydown.esc="hideAllPoppers"
/>
<template #popper>Toggle sidebar</template>
<template #popper><div role="tooltip">Toggle sidebar</div></template>
</VTooltip>
</div>
<div class="chat-sidebar__section-header">
Expand All @@ -33,7 +33,7 @@
@click="handleAddSession"
@keydown.esc="hideAllPoppers"
/>
<template #popper>Add new chat</template>
<template #popper><div role="tooltip">Add new chat</div></template>
</VTooltip>
</div>

Expand All @@ -53,7 +53,9 @@
<VTooltip :auto-hide="isMobile" :popper-triggers="isMobile ? [] : ['hover']">
<span class="chat__name" tabindex="0" @keydown.esc="hideAllPoppers">{{ session.name }}</span>
<template #popper>
{{ session.name }}
<div role="tooltip">
{{ session.name }}
</div>
</template>
</VTooltip>

Expand All @@ -70,7 +72,7 @@
@click.stop="openRenameModal(session)"
@keydown.esc="hideAllPoppers"
/>
<template #popper> Rename chat session </template>
<template #popper><div role="tooltip">Rename chat session</div></template>
</VTooltip>

<!-- Delete session -->
Expand All @@ -84,7 +86,7 @@
@click.stop="sessionToDelete = session"
@keydown.esc="hideAllPoppers"
/>
<template #popper> Delete chat session </template>
<template #popper><div role="tooltip">Delete chat session</div></template>
</VTooltip>
</span>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/ui/UserPortal/components/NavBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
@click="$appStore.toggleSidebar"
@keydown.esc="hideAllPoppers"
/>
<template #popper>Toggle sidebar</template>
<template #popper><div role="tooltip">Toggle sidebar</div></template>
</VTooltip>
</template>
</div>
Expand Down Expand Up @@ -65,7 +65,7 @@
tabindex="0"
@keydown.esc="hideAllPoppers"
/>
<template #popper> Select an agent </template>
<template #popper><div role="tooltip">Select an agent</div></template>
</VTooltip>
<Dropdown
v-model="agentSelection"
Expand Down

0 comments on commit 59d359f

Please sign in to comment.