Skip to content

Commit

Permalink
refactor: improve visually hidden helper
Browse files Browse the repository at this point in the history
  • Loading branch information
sinedied committed May 15, 2024
1 parent 5a160dc commit 009cdc5
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions packages/website/src/theme/_accessibility.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
outline: 2px solid var(--primary);
}

.visually-hidden {
display: block;
height: 0;
.visually-hidden:not(:focus):not(:active) {
clip: rect(0 0 0 0);
clip-path: inset(50%);
height: 1px;
overflow: hidden;
margin: 0;
border: 0;
padding: 0;
position: absolute;
white-space: nowrap;
width: 1px;
}

0 comments on commit 009cdc5

Please sign in to comment.