From a0b2285da2cef6aabf815d9a9870f03ef48ce02c Mon Sep 17 00:00:00 2001 From: Jason Tarka Date: Mon, 21 Mar 2016 17:40:01 -0400 Subject: [PATCH 1/2] Revert "Contain offscreen contents in an invisible single-pixel onscreen element" This reverts commit 320e6543f5d8a030a740ce8315a6385b26ff7d68. --- offscreen.scss | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/offscreen.scss b/offscreen.scss index 8050768..597a15b 100644 --- a/offscreen.scss +++ b/offscreen.scss @@ -1,20 +1,17 @@ @mixin vui-offscreen() { + + $offset: -10000px; + position: absolute !important; + left: $offset; overflow: hidden; - width: 1px; height: 1px; - font-size: 1px; - line-height: 1px; - text-indent: 2px; - white-space: nowrap; + [dir="rtl"] & { + left: auto; + right: $offset; + } - padding: 0; - margin: 0; - background: none; - border: none; - box-shadow: none; - outline: none !important; // important to override :focus } From 9ad60dd9cdb3c0269af0bcf1f9bb22e142a6424e Mon Sep 17 00:00:00 2001 From: Jason Tarka Date: Mon, 21 Mar 2016 17:42:59 -0400 Subject: [PATCH 2/2] Don't use a linewrap - Fixes issues in NVDA and VoiceOver - NVDA would, in some situations, read text without spaces when contained in a 1px-wide element - VoiceOver would read word-by-word when in a 1px-wide element - By making it not wrap, but still overflow, both are able to read text without any issues --- offscreen.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/offscreen.scss b/offscreen.scss index 597a15b..4af3c22 100644 --- a/offscreen.scss +++ b/offscreen.scss @@ -8,6 +8,7 @@ overflow: hidden; width: 1px; height: 1px; + white-space: nowrap; [dir="rtl"] & { left: auto;