From 902954b29825647eaf5435c89e379ef4babe7931 Mon Sep 17 00:00:00 2001 From: tusooa Date: Thu, 9 Feb 2023 21:35:56 -0500 Subject: Use class to style screenreader-only text --- src/App.scss | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/App.scss') diff --git a/src/App.scss b/src/App.scss index 1c4c8941..3f352e8d 100644 --- a/src/App.scss +++ b/src/App.scss @@ -580,8 +580,6 @@ textarea, } &[type="checkbox"] { - display: none; - &:checked + label::before { color: $fallback--text; color: var(--inputText, $fallback--text); @@ -887,3 +885,15 @@ option { opacity: 0; } /* stylelint-enable no-descending-specificity */ + +.visible-for-screenreader-only { + display: block; + width: 1px; + height: 1px; + margin: -1px; + overflow: hidden; + visibility: visible; + clip: rect(0 0 0 0); + padding: 0; + position: absolute; +} -- cgit v1.2.3-70-g09d2