Update note
** Please Note ** This blog post was originally published in December 2009, and the stylesheet (CSS) technique I recommended at the time moved the screen reader text off the page to the left by setting position:absolute; and left:-9999px;
That original definition still works for sites using left-to-right (LTR) languages, but is not compatible with right-to-left (RTL) languages – e.g. Hebrew, Arabic, etc. Recent testing on mobile Android devices using the Talkback screen reader has also shown that the original technique can lead to certain screen reader text elements in pages not being interpreted correctly, or not functioning correctly.
A better definition presented here is compatible with languages in both directions – LTR and RTL, and works better for screen readers on mobile devices.
Why screen reader text?
Blind visitors to your site may well be using a screen reader, or a braille reader. If your site is constructed well and follows the published accessibility guidelines, your site should not present too many problems for these users.
However, there are a number of places on a web page where extra text could be useful for blind users to ensure that the full meaning of the content is apparent. Some examples include:
- Providing more context for link text, or letting people know that links open in a new window.
- Headings for navigation areas or search boxes.
- Special instructions for form input fields – radio buttons maybe.
- Abbreviated words in calendars – eg M T W Th F
Site designers or owners may not like all this extra helpful text being visible on the page, so step forward a technique for effectively hiding the text from sighted users, but at the same time allowing it to be accessed by screen reader users.
A stylesheet technique
This technique uses stylesheet declarations to hide the text from sighted users, but keep it accessible to screen reader users.
Firstly set up a class in your CSS file with the following declaration. You don’t have to call it ‘screen-reader-text’ – use whatever you like.
.screen-reader-text {
border:0;
clip: rect(1px, 1px, 1px, 1px);
clip-path: inset(50%);
height: 1px;
margin: -1px;
width: 1px;
overflow: hidden;
position: absolute !important;
word-wrap:normal !important;
}
Don’t be tempted to use the display:none or visibility:hidden declarations in your stylesheet for this sort of text as screen readers will ignore it, thus defeating your attempt to be helpful to your users.
In your HTML you can then attach this class to whatever text you want to hide. Here are some examples:
Adding context for a ‘Read more’ link in a list of blog posts:
<a href="/my-latest-blog-post/"> <span class="screen-reader-text">My Latest Blog Post: </span> Read more...</a>
Informing screen reader users that a link opens a new window:
<a href="destination.html" target="_blank"> Link destination <span class="screen-reader-text"> opens new window</span></a>
Adding a hidden heading just before the main site navigation:
<h2 class="screen-reader-text">Main Navigation</h2><ul>...
Clarifying abbreviations (original technique):
...<th>Mon<span class="screen-reader-text">day</span></th>...
Note that in the last example which might be found in a calendar or date picker, I’ve split the day names to make some of each word visible and the rest invisible.
Update April 2017: Having tried this in mobile screen readers (such as Voiceover and Talkback) this technique is no longer recommended as the span element will be treated as a separate focusable element by the screen readers. This results in an obscured meaning for the word in mobile screen readers.
A better technique for amplifying abbtreviations:
... <th><span aria-hidden="true">Mon</span> <span class="screen-reader-text">Monday</span></th> ...
This technique uses a span with aria-hidden set to true to present the abbreviated day name, and a full day name contained within a span that is screen reader text. Anything with aria-hidden set to true will be hidden from assistive technologies but will still be visible.
The end result is that sighted users see the abbreviated form, but users of assistive technologies can access the full form.
Used by WordPress
This screen reader text CSS definition is the one currently used within WordPress default themes and many of the accessibility-ready themes in the WordPress theme repository.
If you are using WordPress on your site, and your current theme does not support screen-reader-text, you could try using the screen-reader-text theme support plugin to add it in.
If you are building your own WordPress theme you can include the definition yourself in your theme’s stylesheet.
What happens if CSS is not available?
Obviously, if the pages of your site are ever seen without the stylesheet being available, all the extra screen reader text will become visible. However, if that happens, it’s likely that your pages are going to look quite different anyway, and the extra text shouldn’t detract from the meaning of the page.
Built in HTML accessibility
Some HTML page elements feature help for screen reader users ‘out of the box’. For example, HTML tables have a <caption> element in which you can place an explanation of what the table shows. Also, foreground images in a page have an alt attribute (commonly known as alt text) which should be used to describe what the image shows if it relevant. See Alternate Text for Images for some hints and tips on how to add meaning to your images and photos.
Other posts take a look at these oft-overlooked accessibility features in more detail.
Ready for more accessibility? Try this

Part 4 of my series of videos on basic use of Dragon NaturallySpeaking voice recognition software. This video covers dictating text into wordprocessing software.


Leave a Reply