mirror of
https://github.com/jcreek/SvelteKitSaasBoilerplate.git
synced 2026-07-12 18:43:50 +00:00
refactor(#35): accessible navlinks
This commit is contained in:
@@ -9,7 +9,11 @@
|
||||
</script>
|
||||
|
||||
{#if !linkItem.isSignout}
|
||||
<a role="menuitem" href={linkItem.href} aria-current={linkItem.href === $page.url.pathname ? 'page' : undefined}>{linkItem.text}</a>
|
||||
<a
|
||||
role="menuitem"
|
||||
href={linkItem.href}
|
||||
aria-current={linkItem.href === $page.url.pathname ? 'page' : undefined}>{linkItem.text}</a
|
||||
>
|
||||
{:else if supabase && linkItem.isSignout}
|
||||
<SignOut {supabase} />
|
||||
{/if}
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
</button>
|
||||
{#if isOpen}
|
||||
<ul
|
||||
role="menu"
|
||||
class="menu-dropdown menu-dropdown-show"
|
||||
transition:slide={{ duration: 200, easing: cubicInOut }}
|
||||
>
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
];
|
||||
</script>
|
||||
|
||||
<ul class:flex={!isMobile} class:space-x-4={!isMobile}>
|
||||
<ul role="menu" class:flex={!isMobile} class:space-x-4={!isMobile}>
|
||||
{#each links as link (link.text.replace(' ', '-').toLowerCase())}
|
||||
<li class:md:hidden={link.isUserAccount}>
|
||||
{#if link.isParent}
|
||||
|
||||
Reference in New Issue
Block a user