diff --git a/packages/core/tools/_mixins.scss b/packages/core/tools/_mixins.scss index 6febbbde5..bc903f864 100644 --- a/packages/core/tools/_mixins.scss +++ b/packages/core/tools/_mixins.scss @@ -38,6 +38,18 @@ // @mixin visually-hidden() { + // Absolute positioning has the unintended consequence of removing any + // whitespace surrounding visually hidden text from the accessibility tree. + // Insert a space character before and after visually hidden text to separate + // it from any visible text surrounding it. + &::before { + content: "\00a0"; + } + + &::after { + content: "\00a0"; + } + border: 0; clip: rect(0 0 0 0); -webkit-clip-path: inset(50%);