From cfa3343844758caf30ac75fbf767541cc5b8d96a Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sat, 18 Nov 2023 10:54:49 +0100 Subject: [PATCH] fix: fix sr-only text --- scss/utils/_a11y.scss | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/scss/utils/_a11y.scss b/scss/utils/_a11y.scss index f249252..fa5cf33 100644 --- a/scss/utils/_a11y.scss +++ b/scss/utils/_a11y.scss @@ -1,8 +1,22 @@ -.screen-reader-text, .sr-only { - visibility: collapse; - font-size:0; - position:absolute; - top:-2000px; +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + border: 0; +} + +.sr-only-focusable:active, +.sr-only-focusable:focus { + position: static; + width: auto; + height: auto; + margin: 0; + overflow: visible; + clip: auto; } .skip {