diff options
Diffstat (limited to 'scss/mixins/_visually-hidden.scss')
| -rw-r--r-- | scss/mixins/_visually-hidden.scss | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/scss/mixins/_visually-hidden.scss b/scss/mixins/_visually-hidden.scss index 4fc7f49d6..388916ccf 100644 --- a/scss/mixins/_visually-hidden.scss +++ b/scss/mixins/_visually-hidden.scss @@ -6,7 +6,6 @@ // See: https://kittygiraudel.com/2016/10/13/css-hide-and-seek/ @mixin visually-hidden() { - position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; @@ -15,12 +14,17 @@ clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; + + // Fix for positioned table caption that could become anonymous cells + &:not(caption) { + position: absolute !important; + } } // Use to only display content when it's focused, or one of its child elements is focused // (i.e. when focus is within the element/container that the class was applied to) // -// Useful for "Skip to main content" links; see https://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1 +// Useful for "Skip to main content" links; see https://www.w3.org/WAI/WCAG22/Techniques/general/G1.html @mixin visually-hidden-focusable() { &:not(:focus):not(:focus-within) { |
