Add aria-label and title attributes

This commit is contained in:
Sat Naing
2022-09-17 01:04:48 +06:30
parent 7168fca998
commit 3ea112470e
+10 -2
View File
@@ -2,12 +2,20 @@
export interface Props { export interface Props {
href: string; href: string;
className?: string; className?: string;
ariaLabel?: string;
title?: string;
} }
const { href, className } = Astro.props; const { href, className, ariaLabel, title } = Astro.props;
--- ---
<a type="button" href={href} class={`group ${className}`}> <a
type="button"
href={href}
class={`group ${className}`}
aria-label={ariaLabel}
title={title}
>
<slot /> <slot />
</a> </a>