Skip to content

Commit b307347

Browse files
committed
fix(ui): improve footer a11y and cleanup
1 parent 5ac9737 commit b307347

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

app/components/AppFooter.vue

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,24 @@ const closeModal = () => modalRef.value?.close?.()
1212
1313
type FooterLink =
1414
| { name: string; href: string; kbd?: never; type?: never }
15-
| { name: string; kbd: string; href?: never; type?: never }
1615
| { name: string; type: 'button'; href?: never; kbd?: never }
1716
1817
const socialLinks = computed(() => [
1918
{
2019
id: 'github',
20+
label: 'GitHub',
2121
href: 'https://repo.npmx.dev',
2222
icon: 'i-simple-icons:github',
2323
},
2424
{
2525
id: 'discord',
26+
label: 'Discord',
2627
href: discord.value.url,
2728
icon: 'i-simple-icons:discord',
2829
},
2930
{
3031
id: 'bluesky',
32+
label: 'Bluesky',
3133
href: 'https://social.npmx.dev',
3234
icon: 'i-simple-icons:bluesky',
3335
},
@@ -105,11 +107,11 @@ const footerSections: Array<{ label: string; links: FooterLink[] }> = [
105107
v-for="link in socialLinks"
106108
:key="link.id"
107109
:to="link.href"
108-
:aria-label="link.id"
110+
:aria-label="link.label"
109111
target="_blank"
110112
class="text-fg-muted hover:text-accent transition-all duration-200"
111113
>
112-
<span :class="[link.icon, 'size-7']" />
114+
<span :class="[link.icon, 'size-7']" aria-hidden="true" />
113115
</NuxtLink>
114116
</div>
115117
</div>
@@ -126,13 +128,14 @@ const footerSections: Array<{ label: string; links: FooterLink[] }> = [
126128
<template v-for="link in section.links" :key="link.name">
127129
<button
128130
v-if="link.type === 'button'"
129-
class="cursor-pointer text-start font-mono text-fg-subtle text-sm hover:text-accent transition-colors duration-200"
131+
type="button"
132+
class="cursor-pointer text-start font-mono text-fg-subtle text-sm lowercase hover:text-accent transition-colors duration-200"
130133
@click="showModal()"
131134
>
132135
{{ $t(link.name) }}
133136
</button>
134137

135-
<LinkBase v-else :key="link.name" :to="link?.href" variant="footer">
138+
<LinkBase v-else :to="link?.href" variant="footer">
136139
{{ $t(link.name) }}
137140
</LinkBase>
138141
</template>

0 commit comments

Comments
 (0)