Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F85831510
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 95e8720cad..5b7eaa4424 100644
--- a/src/components/popover/popover.vue
+++ b/src/components/popover/popover.vue
@@ -1,65 +1,66 @@
<template>
<button
ref="trigger"
type="button"
class="popover-trigger-button"
:class="triggerClass"
:aria-haspopup="ariaHasPopup"
:aria-owns="hidden ? undefined : `${idPrefix}content`"
+ :aria-describedby="tooltip ? `${idPrefix}content` : undefined"
:aria-expanded="!hidden ? 'true' : 'false'"
:aria-label="label ?? $attrs['aria-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="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>
</button>
</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 c8ab2382c0..dacded85b8 100644
--- a/src/components/tooltip/tooltip.vue
+++ b/src/components/tooltip/tooltip.vue
@@ -1,34 +1,32 @@
<template>
<Popover
trigger="hover"
tooltip
:label="label"
- :aria-describedby="idPrefix + 'content'"
+ popover-class="popover-default tooltip"
v-bind="$attrs"
>
<template #trigger>
<slot />
</template>
<template #content>
- <div class="tooltip" role="tooltip" :id="idPrefix + 'content'">
- {{ props.text }}
- </div>
+ {{ props.text }}
</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}`)
</script>
<style lang="scss">
.tooltip {
- margin: 0.5em 1em;
+ padding: 0.5em 1em;
}
</style>
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sun, Nov 1, 4:54 PM (6 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1803183
Default Alt Text
(3 KB)
Attached To
Mode
rPUFE pleroma-fe-upstream
Attached
Detach File
Event Timeline