Skip to content

Commit

Permalink
feat(core): use more a11y friendly hidden (#654)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dringsim committed Jun 4, 2023
1 parent 83c42ee commit f9dad61
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion resources/mixins.less
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,15 @@
}

// To hide objects, but keep them accessible for screen-readers
// From https://www.a11yproject.com/posts/how-to-hide-content
.hidden() {
clip: rect(0 0 0 0);
clip-path: inset(50%);
height: 1px;
overflow: hidden;
position: absolute;
top: -9999px;
white-space: nowrap;
width: 1px;
}

// Set content to be at the center
Expand Down

0 comments on commit f9dad61

Please sign in to comment.