0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-02 14:24:19 +01:00
Bootstrap/site/docs/4.1/utilities/screenreaders.md
Mark Otto 0e920ce3f4 Reorganize docs for easier deploys
With the current docs directory setup, I'm making too many mistakes and have to manually address path changes and directory moves on deploy. This makes for a frustrating experience developing locally and shipping releases. With this PR, we're basically back to the same setup from v3—duplicating the dist directory into our docs directory. Not the most ideal, but very straightforward for me as the release manager.
2018-07-11 23:30:46 -07:00

853 B

layout title description group toc
docs Screenreaders Use screenreader utilities to hide elements on all devices except screen readers. utilities true

Hide an element to all devices except screen readers with .sr-only. Combine .sr-only with .sr-only-focusable to show the element again when it's focused (e.g. by a keyboard-only user). Can also be used as mixins.

{%- comment -%} Necessary for following [accessibility best practices]({{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/#accessibility). {%- endcomment -%}

{% capture example %} Skip to main content {% endcapture %} {% include example.html content=example %}

{% highlight scss %} // Usage as a mixin .skip-navigation { @include sr-only; @include sr-only-focusable; } {% endhighlight %}