1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-26 23:04:32 +02:00

Cleanup/fix after the sr-only to visually-hidden renaming (#31359)

* sr-only -> visually-hidden cleanup

It seems the old screen-readers.md file was left behind, and forgot to rename the mixin

* Fix broken mixins for visually-hidden
This commit is contained in:
Patrick H. Lauke
2020-07-31 10:27:36 +01:00
committed by GitHub
parent 8aab8b7c8a
commit cdea25584d
3 changed files with 4 additions and 29 deletions

View File

@@ -1,25 +0,0 @@
---
layout: docs
title: Screen readers
description: Use screen reader utilities to hide elements on all devices except screen readers.
group: helpers
---
Hide an element to all devices **except screen readers** with `.visually-hidden`. Use `.visually-hidden-focusable` to show the element only when it's focused (e.g. by a keyboard-only user). Can also be used as mixins.
{{< example >}}
<h2 class="visually-hidden">Title for screen readers</h2>
<a class="visually-hidden-focusable" href="#content">Skip to main content</a>
{{< /example >}}
{{< highlight scss >}}
// Usage as a mixin
.visually-hidden-title {
@include visually-hidden;
}
.skip-navigation {
@include visually-hidden-focusable;
}
{{< /highlight >}}