diff options
author | Louise Crow <louise.crow@gmail.com> | 2015-04-02 17:09:43 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2015-04-02 17:09:43 +0100 |
commit | cbfd41b3cabf99a104b4487d7157c81426b1077a (patch) | |
tree | 8fad694963533d4a786057b061c148c5971fd401 /app/assets/stylesheets/responsive/_utils.scss | |
parent | e7b415e60da70a5905b03e9b456b285e54a2c403 (diff) | |
parent | 642ea4a8e7e57bad1187f0ecc9bb286545b5c5a6 (diff) |
Merge branch 'search-form' into rails-3-develop
Diffstat (limited to 'app/assets/stylesheets/responsive/_utils.scss')
-rw-r--r-- | app/assets/stylesheets/responsive/_utils.scss | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/assets/stylesheets/responsive/_utils.scss b/app/assets/stylesheets/responsive/_utils.scss index 68884fa7a..e19201475 100644 --- a/app/assets/stylesheets/responsive/_utils.scss +++ b/app/assets/stylesheets/responsive/_utils.scss @@ -33,3 +33,18 @@ $lte-ie7: false !default; @content; } } + +// Hide content visually, but keep it available to screen readers +// source: http://a11yproject.com/posts/how-to-hide-content/ +.visually-hidden { + // http://developer.yahoo.com/blogs/ydn/posts/2012/10/clip-your-hidden-content-for-better-accessibility/ + position: absolute !important; + clip: rect(1px 1px 1px 1px); /* IE6, IE7 */ + clip: rect(1px, 1px, 1px, 1px); + padding:0 !important; + border:0 !important; + height: 1px !important; + width: 1px !important; + overflow: hidden; +} +body:hover .visually-hidden a, body:hover .visually-hidden input, body:hover .visually-hidden button { display: none !important; } |