1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-30 08:39:56 +02:00

Rename sr-only/sr-only-focusable (#31139)

* Rename `sr-only`/`sr-only-focusable`

To be more representative of the fact that these are not necessarily "screen reader" specific, but actually apply to assistive technologies in general (and also things like Alexa/Siri/etc). Goes hand-in-hand with #31133

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
Patrick H. Lauke
2020-07-03 12:38:11 +01:00
committed by GitHub
parent 0a6cf9036c
commit 10690dd317
21 changed files with 104 additions and 99 deletions

View File

@@ -2,7 +2,7 @@
// Screenreaders
//
.sr-only,
.sr-only-focusable:not(:focus) {
@include sr-only();
.visually-hidden,
.visually-hidden-focusable:not(:focus) {
@include visually-hidden();
}

View File

@@ -5,7 +5,7 @@
// See: https://a11yproject.com/posts/how-to-hide-content/
// See: https://hugogiraudel.com/2016/10/13/css-hide-and-seek/
@mixin sr-only {
@mixin visually-hidden {
position: absolute !important;
width: 1px !important;
height: 1px !important;
@@ -21,8 +21,8 @@
//
// Useful for "Skip to main content" links; see https://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1
@mixin sr-only-focusable {
@mixin visually-hidden-focusable {
&:not(:focus) {
@include sr-only();
@include visually-hidden();
}
}