Page MenuHomePhorge

No OneTemporary

Size
3 KB
Referenced Files
None
Subscribers
None
diff --git a/src/components/popover/popover.js b/src/components/popover/popover.js
index ab8e8d45e4..106fb6fd6a 100644
--- a/src/components/popover/popover.js
+++ b/src/components/popover/popover.js
@@ -2,6 +2,7 @@ import { useId } from 'vue'
const Popover = {
name: 'Popover',
+ inheritAttrs: false,
props: {
// Action to trigger popover: either 'hover' or 'click'
trigger: String,
@@ -118,11 +119,18 @@ const Popover = {
if (this.hideTrigger) {
attrs['aria-hidden'] = true
- attrs.tabindex = 1
+ attrs.tabindex = 0
}
return attrs
},
+ ariaHasPopup() {
+ if (this.tooltip || this.disabled) {
+ return undefined
+ } else {
+ return this.$attrs['aria-haspopup'] ?? 'menu'
+ }
+ },
triggerClass() {
if (this.link) {
return ''
diff --git a/src/components/popover/popover.vue b/src/components/popover/popover.vue
index ea4e4a2dfd..b0ad5d1132 100644
--- a/src/components/popover/popover.vue
+++ b/src/components/popover/popover.vue
@@ -1,11 +1,13 @@
<template>
<component
+ ref="trigger"
:is="link ? 'a' : 'button'"
:type="link ? undefined : 'button'"
- :aria-haspopup="tooltip ? undefined : !disabled"
- :aria-owns="hidden ? undefined : `${idPrefix}content`"
class="popover-trigger-button"
:class="triggerClass"
+ :aria-haspopup="ariaHasPopup"
+ :aria-owns="hidden ? undefined : `${idPrefix}content`"
+ :aria-expanded="!hidden"
@mouseenter="onMouseenter"
@mouseleave="onMouseleave"
@click="onClick"
@@ -14,7 +16,6 @@
@keydown.tab.exact="onTab"
@keydown.tab.shift.exact="hidePopover"
v-bind="allTriggerAttrs"
- ref="trigger"
>
<slot name="trigger" />
<teleport
@@ -24,7 +25,7 @@
<transition name="fade">
<div
v-if="!hidden"
- :id="$attrs.id ?? idPrefix + 'content'"
+ :id="($attrs.id ?? idPrefix) + 'content'"
ref="content"
:style="styles"
class="popover"
@@ -34,7 +35,6 @@
@mouseenter="onMouseenterContent"
@mouseleave="onMouseleaveContent"
@click="onClickContent"
- v-bind="$attrs"
>
<span
class="focus-trap -before"
diff --git a/src/components/status_popover/status_popover.vue b/src/components/status_popover/status_popover.vue
index f0892ded8b..0809f64639 100644
--- a/src/components/status_popover/status_popover.vue
+++ b/src/components/status_popover/status_popover.vue
@@ -1,15 +1,16 @@
<template>
<Popover
ref="popover"
+ popover-class="popover-default status-popover"
trigger="hover"
+ :link="link"
+ :href="statusLink"
:stay-on-click="true"
- popover-class="popover-default status-popover"
:bound-to="{ x: 'container' }"
- :href="statusLink"
+ aria-haspopup="dialog"
@show="enter"
- :link="link"
- v-bind="$attrs"
@click.prevent="navigate"
+ v-bind="$attrs"
>
<template #trigger>
<slot />
diff --git a/src/components/user_popover/user_popover.vue b/src/components/user_popover/user_popover.vue
index 0e6f14eb2f..2f6dad27dc 100644
--- a/src/components/user_popover/user_popover.vue
+++ b/src/components/user_popover/user_popover.vue
@@ -6,6 +6,7 @@
:overlay-centers="overlayCenters && userPopoverOverlay"
:link="link"
:href="href"
+ aria-haspopup="dialog"
v-bind="$attrs"
>
<template #trigger>

File Metadata

Mime Type
text/x-diff
Expires
Sat, Oct 10, 4:08 PM (1 d, 8 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1785348
Default Alt Text
(3 KB)

Event Timeline