Skip to content

Commit

Permalink
Fix visibility of focused skip link on docs site (#2405)
Browse files Browse the repository at this point in the history
* Fix visibility of focused skip link on docs site

The `sr-only` utility class used on the “Skip to Content” link at the top of each page in the docs is designed to be paired with the `focus:not-sr-only` class. `focus:not-sr-only` was missing on the skip link, meaning it was never shown even when focused.

* Fix visibility of focused skip link in docs example project

Apply the same fix as ac890b5 to the same component in the docs starter project.
  • Loading branch information
delucis authored Jan 19, 2022
1 parent e0def89 commit 9deada6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/src/components/Header/SkipToContent.astro
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<a href="#article" class="sr-only skiplink"><span>Skip to Content</span></a>
<a href="#article" class="sr-only focus:not-sr-only skiplink"><span>Skip to Content</span></a>

<style>
.skiplink,
Expand Down
2 changes: 1 addition & 1 deletion examples/docs/src/components/Header/SkipToContent.astro
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<a href="#article" class="sr-only skiplink"><span>Skip to Content</span></a>
<a href="#article" class="sr-only focus:not-sr-only skiplink"><span>Skip to Content</span></a>

<style>
.skiplink,
Expand Down

0 comments on commit 9deada6

Please sign in to comment.