Skip to content
This repository was archived by the owner on Nov 25, 2024. It is now read-only.

Commit 8d1661d

Browse files
authored
fix: accessibility warning (#63)
* Fix accessibility issue * Add chngeset
1 parent a349108 commit 8d1661d

File tree

2 files changed

+9
-17
lines changed

2 files changed

+9
-17
lines changed

.changeset/thin-files-run.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@sveltejs/site-kit": patch
3+
---
4+
5+
Fix accessibility bug

packages/site-kit/src/lib/components/Nav.svelte

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -49,21 +49,12 @@
4949
<div
5050
class="modal-background hide-if-desktop"
5151
on:click={() => (open = false)}
52+
on:keydown={(e) => e.key === ' ' && (open = false)}
5253
/>
5354
{/if}
5455

55-
<nav
56-
class:visible={visible || open}
57-
class:open
58-
bind:this={nav}
59-
aria-label="Primary"
60-
>
61-
<a
62-
href="/"
63-
class="nav-spot home"
64-
title={home_title}
65-
style="background-image: url({logo})"
66-
>
56+
<nav class:visible={visible || open} class:open bind:this={nav} aria-label="Primary">
57+
<a href="/" class="nav-spot home" title={home_title} style="background-image: url({logo})">
6758
{home}
6859
</a>
6960

@@ -191,11 +182,7 @@
191182
left: var(--sk-page-padding-side);
192183
width: calc(100% - 2 * var(--sk-page-padding-side));
193184
height: 1px;
194-
background: radial-gradient(
195-
circle at center,
196-
rgba(0, 0, 0, 0.1),
197-
rgba(0, 0, 0, 0.05)
198-
);
185+
background: radial-gradient(circle at center, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.05));
199186
}
200187
201188
ul.external::after {

0 commit comments

Comments
 (0)