Skip to content

Commit d9c61ce

Browse files
committed
refactor: set hovercard label with aria-labelledby ref
1 parent b6c1f79 commit d9c61ce

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

app/pages/about.vue

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ function onBeforeToggleHoverCard(event) {
281281
<article
282282
id="contributor-hovercard"
283283
popover="hint"
284-
:aria-label="activeContributor?.name || activeContributor?.login"
284+
aria-labelledby="contributor-hovercard-title"
285285
class="contributor-hovercard"
286286
@beforetoggle="onBeforeToggleHoverCard"
287287
>
@@ -290,9 +290,12 @@ function onBeforeToggleHoverCard(event) {
290290
class="flex flex-col gap-y-3 w-64 rounded-xl border border-border-subtle bg-bg-elevated p-4 shadow-2xl text-start"
291291
>
292292
<div class="flex flex-col gap-2 min-w-0">
293-
<span class="w-full font-sans font-bold text-fg leading-tight truncate block">
293+
<h4
294+
id="contributor-hovercard-title"
295+
class="w-full font-sans font-bold text-fg leading-tight truncate block"
296+
>
294297
{{ activeContributor.name || activeContributor.login }}
295-
</span>
298+
</h4>
296299
<div
297300
v-if="roleLabels[activeContributor.role]"
298301
class="font-mono text-3xs uppercase tracking-wider text-accent font-bold"

0 commit comments

Comments
 (0)