Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F85827929
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
3 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/src/components/popover/popover.vue b/src/components/popover/popover.vue
index af2a4450f2..b5c2bd67ed 100644
--- a/src/components/popover/popover.vue
+++ b/src/components/popover/popover.vue
@@ -1,66 +1,66 @@
<template>
<component
ref="trigger"
:is="link ? 'a' : 'button'"
:type="link ? undefined : 'button'"
class="popover-trigger-button"
:class="triggerClass"
:aria-haspopup="ariaHasPopup"
:aria-owns="hidden ? undefined : `${idPrefix}content`"
:aria-expanded="!hidden"
:aria-label="label"
@mouseenter="onMouseenter"
@mouseleave="onMouseleave"
@click="onClick"
@focus="onFocus"
@blur="onBlur"
@keydown.tab.exact="onTab"
@keydown.tab.shift.exact="hidePopover"
v-bind="allTriggerAttrs"
>
<slot name="trigger" />
<teleport
:disabled="!teleport"
to="#popovers"
>
<transition name="fade">
<div
v-if="!hidden"
:id="($attrs.id ?? idPrefix) + 'content'"
ref="content"
:style="styles"
class="popover"
- role="dialog"
+ :role="tooltip ? 'tooltip' : 'dialog'"
:aria-label="$attrs['aria-label']"
:class="popoverClass || 'popover-default'"
@mouseenter="onMouseenterContent"
@mouseleave="onMouseleaveContent"
@click="onClickContent"
>
<span
class="focus-trap -before"
aria-hidden="1"
tabindex="0"
@focus="onReverseTabContentFocus"
/>
<slot
name="content"
class="popover-inner"
:close="hidePopover"
:resize="resizePopover"
/>
<span
class="focus-trap -after"
aria-hidden="1"
tabindex="0"
@focus="onForwardTabContentFocus"
/>
</div>
</transition>
</teleport>
</component>
</template>
<script src="./popover.js" />
<style src="./popover.scss" lang="scss"></style>
diff --git a/src/components/tooltip/tooltip.vue b/src/components/tooltip/tooltip.vue
index 8558c45695..c8ab2382c0 100644
--- a/src/components/tooltip/tooltip.vue
+++ b/src/components/tooltip/tooltip.vue
@@ -1,33 +1,34 @@
<template>
<Popover
trigger="hover"
tooltip
- :label="label ?? $t('general.help')"
+ :label="label"
+ :aria-describedby="idPrefix + 'content'"
v-bind="$attrs"
>
<template #trigger>
<slot />
</template>
<template #content>
<div class="tooltip" role="tooltip" :id="idPrefix + 'content'">
{{ props.text }}
</div>
</template>
</Popover>
</template>
<script setup>
import { computed, useId } from 'vue'
import Popover from 'src/components/popover/popover.vue'
const props = defineProps({ text: String, label: String })
const uniqueId = useId()
-const idPrefix = computed(() => `tooltip-${uniqueId.value}`)
+const idPrefix = computed(() => `tooltip-${uniqueId}`)
</script>
<style lang="scss">
.tooltip {
margin: 0.5em 1em;
}
</style>
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sat, Oct 31, 12:22 AM (16 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1800807
Default Alt Text
(3 KB)
Attached To
Mode
rPUFE pleroma-fe-upstream
Attached
Detach File
Event Timeline