Skip to content

Commit

Permalink
made accessibility changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jhilker98 committed Oct 1, 2023
1 parent 414d5bb commit 27c9e77
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/components/Header.astro
Original file line number Diff line number Diff line change
Expand Up @@ -54,25 +54,30 @@ const currentPath = pathname.slice(1); // remove the first "/"
type="button"
class="h-full p-3 duration-75 hover:backdrop-brightness-75 inline-flex place-items-center dark:hover:backdrop-brightness-125"
aria-label="Toggle Dark Mode"
@click="darkMode = !darkMode">
@click="darkMode = !darkMode"
aria-hidden="true">
<Icon
name="heroicons/sun-solid"
class="text-branding-white hidden dark:inline-block w-5 h-5"
focusable="false"
/>
<Icon
name="heroicons/moon-solid"
class="text-branding-black dark:hidden inline-block w-5 h-5"
focusable="false"
/>
</button>
<button
type="button"
aria-label="Toggle Mobile Sidebar"
class="h-full p-3 duration-75 hover:backdrop-brightness-75 inline-flex place-items-center dark:hover:backdrop-brightness-125 lg:hidden"
@click="sidebarOpen = !sidebarOpen">
@click="sidebarOpen = !sidebarOpen"
aria-hidden="true">
<Icon
name="heroicons/bars-3-20-solid"
class="w-5 h-5 transition duration-150 text-branding-black dark:text-branding-white"
:class="{'rotate-90': sidebarOpen === true}"
focusable="false"
/>
<span class="sr-only">Toggle Mobile Sidebar</span>
</button>
Expand Down
1 change: 1 addition & 0 deletions src/components/MobileSidebar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import sidebar from "@assets/img/sidebar.svg";
href={link.href}
class="text-branding-white hover:text-blue-400 transition-colors duration-75 group"
aria-hidden="true"
aria-label={link.name}
title={link.name}>
<Icon
name={link.icon}
Expand Down

0 comments on commit 27c9e77

Please sign in to comment.