misc: Improve accessibility

This commit is contained in:
Xyphyn committed 2023-07-07 12:41:32 -07:00
1 parent ce19dd3a17
commit 0cd8fb1165
6 files changed
+28 -10

No files matched your search

+2
View File
@@ -8,6 +8,7 @@
export let large = false
export let disabled = false
export let submit = false
export let label: string = ''
const dispatch = createEventDispatcher()
</script>
@@ -21,6 +22,7 @@
? 'opacity-50 pointer-events-none'
: ''}"
type={submit ? 'submit' : 'button'}
aria-label={label}
>
<div
class="flex flex-row items-center justify-center gap-2"
+9 -7
View File
@@ -1,15 +1,17 @@
<script lang="ts">
import { Color } from '$lib/ui/colors.js'
import { Color } from '$lib/ui/colors.js'
export let color: Color = Color.secondary
export let href = ''
export let color: Color = Color.secondary
export let href = ''
export let label: string = ''
</script>
<a
{href}
class="px-2 py-1 rounded-md {color} flex flex-row items-center
{href}
class="px-2 py-1 rounded-md {color} flex flex-row items-center
justify-center text-sm transition-all"
aria-label={label}
>
<slot name="icon" />
<slot />
<slot name="icon" />
<slot />
</a>