www: improve accessbility (#1507)

This commit is contained in:
Tim Hårek Andreassen
2023-07-22 20:23:42 +02:00
committed by GitHub
parent 16453b4dc9
commit 9cae8fdd5c
13 changed files with 61 additions and 30 deletions
+8 -2
View File
@@ -57,7 +57,10 @@ export default function ComponentGallery(props: ComponentGalleryProps) {
Click me
</Button>
<Button class="flex gap-1">
<IconHappy class="w-6 h-6 inline-block text-gray-500" />
<IconHappy
class="w-6 h-6 inline-block text-gray-500"
aria-hidden="true"
/>
<div>
With an Icon
</div>
@@ -81,7 +84,10 @@ export default function ComponentGallery(props: ComponentGalleryProps) {
source={props.sources.LinkButton}
>
<LinkButton>
<IconHeart class="w-5 h-5 mr-1 inline-block text-gray-400" />
<IconHeart
class="w-5 h-5 mr-1 inline-block text-gray-400"
aria-hidden="true"
/>
Like me
</LinkButton>
</Section>
+2 -2
View File
@@ -38,8 +38,8 @@ export default function CopyArea(props: { code: string }) {
<div class="relative my-2 mr-4">
<div
class={`transition ease-in-out absolute pointer-events-none bg-gray-900 text-white absolute p-2 -top-1/3 left-1/2 transform -translate-x-1/2 -translate-y-full box-border rounded opacity-0 ${
copied.value && "opacity-100"
class={`hidden transition ease-in-out absolute pointer-events-none bg-gray-900 text-white absolute p-2 -top-1/3 left-1/2 transform -translate-x-1/2 -translate-y-full box-border rounded opacity-0 ${
copied.value && "block opacity-100"
}`}
>
Copied!
+1 -1
View File
@@ -20,7 +20,7 @@ export default function VersionSelect(
</label>
{selectedIsLatest && (
<div class="flex absolute pointer-events-none select-none w-full h-full items-center justify-end pr-8">
<div class="rounded-full px-2 py-1 text-xs tag-label bg-[#056CF025] text-blue-600">
<div class="rounded-full px-2 py-1 text-xs tag-label bg-[#056CF025] text-blue-700">
Latest
</div>
</div>