Skip to content

Commit dc2211d

Browse files
committed
Enhance Card component accessibility with ARIA attributes
1 parent ca4bbb6 commit dc2211d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

resources/js/components/ui/card/Card.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,18 @@ import type { HTMLAttributes } from 'vue';
44
55
const props = defineProps<{
66
class?: HTMLAttributes['class'];
7+
'aria-labelledby'?: string;
8+
'aria-describedby'?: string;
79
}>();
810
</script>
911

1012
<template>
11-
<div :class="cn('rounded-lg border bg-card text-card-foreground shadow-sm', props.class)">
13+
<div
14+
:class="cn('rounded-lg border bg-card text-card-foreground shadow-sm', props.class)"
15+
role="region"
16+
:aria-labelledby="props['aria-labelledby']"
17+
:aria-describedby="props['aria-describedby']"
18+
>
1219
<slot />
1320
</div>
1421
</template>

0 commit comments

Comments
 (0)