Skip to content

Commit 9cc4c00

Browse files
authored
fix(a11y): accessibility of the website
2 parents a6e2d06 + f90b2ad commit 9cc4c00

4 files changed

Lines changed: 38 additions & 62 deletions

File tree

app/components/SponsorSection.vue

Lines changed: 31 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -9,67 +9,39 @@
99
}"
1010
>
1111
<div class="flex flex-col items-center">
12-
<!-- <template v-for="({ tier, sponsors }) of sponsorGroups" :key="tier"> -->
1312
<div class="w-full mb-24">
14-
<!-- <UBadge color="neutral" variant="subtle" class="capitalize mb-2">
15-
{{ tier }} sponsors
16-
</UBadge> -->
17-
18-
<div class="w-full border border-default rounded-lg">
19-
<table class="w-full">
20-
<tbody>
21-
<template
22-
v-for="(_, rowIndex) in Math.ceil(sponsors.length / 3)"
23-
:key="rowIndex"
24-
>
25-
<tr>
26-
<template v-for="colIndex in 3" :key="colIndex">
27-
<td
28-
v-if="rowIndex * 3 + colIndex - 1 < sponsors.length"
29-
class="border-b border-r border-default p-0 w-1/3 h-[120px]"
30-
:class="{
31-
'border-r-0': colIndex === 3,
32-
'border-b-0':
33-
rowIndex === Math.ceil(sponsors.length / 3) - 1,
34-
}"
35-
>
36-
<NuxtLink
37-
:to="sponsors[rowIndex * 3 + colIndex - 1].url"
38-
target="_blank"
39-
class="flex items-center gap-2 justify-center h-full hover:bg-muted/50 transition-colors"
40-
>
41-
<NuxtImg
42-
:src="`/sponsors/${sponsors[rowIndex * 3 + colIndex - 1]?.image.src}`"
43-
:alt="`${sponsors[rowIndex * 3 + colIndex - 1]?.image.alt}`"
44-
loading="lazy"
45-
class="h-10 max-w-[140px] object-contain rounded-lg"
46-
height="40"
47-
width="40"
48-
/>
49-
<span class="text-base hidden sm:block font-semibold">{{
50-
sponsors[rowIndex * 3 + colIndex - 1].title
51-
}}</span>
52-
</NuxtLink>
53-
</td>
54-
<td
55-
v-else
56-
class="border-b border-r border-default p-0 w-1/3 h-[120px]"
57-
:class="{
58-
'border-r-0': colIndex === 3,
59-
'border-b-0':
60-
rowIndex === Math.ceil(sponsors.length / 3) - 1,
61-
}"
62-
>
63-
<div class="h-full" />
64-
</td>
65-
</template>
66-
</tr>
67-
</template>
68-
</tbody>
69-
</table>
70-
</div>
13+
<ul
14+
class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 w-full border border-default rounded-lg overflow-hidden list-none p-0"
15+
>
16+
<li
17+
v-for="(sponsor, index) in sponsors"
18+
:key="sponsor.url"
19+
class="h-[120px] border-default"
20+
:class="{
21+
'border-r': (index + 1) % 3 !== 0,
22+
'border-b': index < sponsors.length - (sponsors.length % 3 || 3),
23+
}"
24+
>
25+
<NuxtLink
26+
:to="sponsor.url"
27+
target="_blank"
28+
class="flex items-center gap-2 justify-center h-full hover:bg-muted/50 transition-colors"
29+
>
30+
<NuxtImg
31+
:src="`/sponsors/${sponsor.image.src}`"
32+
:alt="sponsor.image.alt"
33+
loading="lazy"
34+
class="h-10 max-w-[140px] object-contain rounded-lg"
35+
height="40"
36+
width="40"
37+
/>
38+
<span class="text-base hidden sm:block font-semibold">{{
39+
sponsor.title
40+
}}</span>
41+
</NuxtLink>
42+
</li>
43+
</ul>
7144
</div>
72-
<!-- </template> -->
7345
</div>
7446
</UPageSection>
7547
</template>

app/components/plugin/PluginItem.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ const items = computed(() => [
9898
<UContextMenu :items="items">
9999
<UPageCard
100100
:to="`/plugins/${plugin?.key}`"
101-
:title="plugin?.name"
102101
:description="plugin?.description"
103102
class="group"
104103
variant="subtle"
@@ -112,6 +111,10 @@ const items = computed(() => [
112111
}"
113112
@click="handleCardClick"
114113
>
114+
<template #title>
115+
<h3>{{ plugin?.name }}</h3>
116+
</template>
117+
115118
<template #leading>
116119
<UAvatar
117120
v-if="!isDefaultPluginIcon(plugin?.icon)"

app/pages/about.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,9 @@ const stats = [
228228
name="i-lucide-heart"
229229
class="w-12 h-12 mx-auto mb-4 text-primary-600 dark:text-primary-400"
230230
/>
231-
<h2 class="text-2xl font-bold text-gray-900 dark:text-white mb-4">
231+
<h3 class="text-2xl font-bold text-gray-900 dark:text-white mb-4">
232232
Get Involved
233-
</h2>
233+
</h3>
234234
<p class="text-lg text-gray-600 dark:text-gray-400 mb-6">
235235
Every contribution is welcome and appreciated! Join our community and
236236
help make Litestar even better.

app/pages/plugins/index.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ initializePlugins()
299299

300300
<UPage id="smooth" class="relative z-20">
301301
<UPageBody>
302+
<h2 class="sr-only">Browse plugins</h2>
302303
<div class="flex items-center gap-2 mb-4 text-muted">
303304
<UIcon name="i-lucide-info" class="size-4" />
304305
<span class="text-xs"

0 commit comments

Comments
 (0)