Skip to content

Commit e92c215

Browse files
Add accessible names to decorative SVG icons
1 parent 695a984 commit e92c215

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/components/IconButton.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const { icon, label, href, className } = Astro.props;
2121
class={`inline-block h-min w-min rounded-full p-2 leading-0 transition-colors hover:bg-gray-800/20 dark:hover:bg-gray-400/20 ${className}`}
2222
aria-label={label}
2323
>
24-
<Icon name={icon} class="size-6 text-gray-700 dark:text-gray-300" />
24+
<Icon name={icon} class="size-6 text-gray-700 dark:text-gray-300" aria-hidden="true" />
2525
</a>
2626
) : (
2727
<button class={`h-min w-min rounded-full p-2 transition-colors hover:bg-gray-800/20 ${className}`} aria-label={label}>

src/components/layout/NavBar.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ import LogoMarkerLight from "@/assets/brand/logo-marker-light.svg";
3333
</NavDropDown>
3434
<NavLink href="https://hangar.papermc.io/" target="_blank" className="inline-flex items-center">
3535
Plugins
36-
<Icon name="icons/heroicons/arrow-top-right-on-square" class="ml-1 size-4 align-sub" />
36+
<Icon name="icons/heroicons/arrow-top-right-on-square" class="ml-1 size-4 align-sub" aria-hidden="true" />
3737
</NavLink>
3838
<NavLink href="https://docs.papermc.io/" target="_blank" className="inline-flex items-center">
3939
Docs
40-
<Icon name="icons/heroicons/arrow-top-right-on-square" class="ml-1 size-4 align-sub" />
40+
<Icon name="icons/heroicons/arrow-top-right-on-square" class="ml-1 size-4 align-sub" aria-hidden="true" />
4141
</NavLink>
4242
<NavLink href="/news">News</NavLink>
4343
<NavLink href="/team">Team</NavLink>

src/components/layout/NavDropDown.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const { label, className } = Astro.props;
2727
data-trigger
2828
>
2929
{label}
30-
<Icon name="icons/heroicons/chevron-down" class="h-4 w-4 fill-gray-700 dark:fill-gray-300" />
30+
<Icon name="icons/heroicons/chevron-down" class="h-4 w-4 fill-gray-700 dark:fill-gray-300" aria-hidden="true" />
3131
</span>
3232

3333
<ul

0 commit comments

Comments
 (0)