summaryrefslogtreecommitdiffstats
path: root/apps/web-shared/src/styles/base/_accessibility.scss
diff options
context:
space:
mode:
Diffstat (limited to 'apps/web-shared/src/styles/base/_accessibility.scss')
-rw-r--r--apps/web-shared/src/styles/base/_accessibility.scss17
1 files changed, 17 insertions, 0 deletions
diff --git a/apps/web-shared/src/styles/base/_accessibility.scss b/apps/web-shared/src/styles/base/_accessibility.scss
new file mode 100644
index 0000000..9f71937
--- /dev/null
+++ b/apps/web-shared/src/styles/base/_accessibility.scss
@@ -0,0 +1,17 @@
+.sr-only { // content made available only to screen readers
+ position: absolute;
+ clip: rect(1px, 1px, 1px, 1px);
+ clip-path: inset(50%);
+ width: 1px;
+ height: 1px;
+ overflow: hidden;
+ padding: 0;
+ border: 0;
+ white-space: nowrap;
+}
+
+.sr-only-focusable { // focusable, visually hidden element
+ &:not(:focus):not(:focus-within){
+ @extend .sr-only
+ }
+} \ No newline at end of file