I would like to provide a bit of assistance to blind users by having my website read something to them, briefly. Is this possible?

有帮助吗?

解决方案

One way you can provide content that will be read to users using a screen reader (but not shown to sighted users) is by positioning the content using CSS such that it is offscreen.

E.g. Something like:

In CSS:

.screen-reader { 
  position: absolute; 
  left: -10000px; 
  width: 1px; 
  height: 1px; 
  overflow: hidden; 
}

In your HTML:

<p>This text will be read to the screen reader and shown on screen.</p>
<p class="screen-reader">This text will be read to a screen reader but won't show up on screen.</p>

See Techniques for hiding text (at WebAIM) for more info.

其他提示

This is a web-technology in progress. One I know of is Google Text-To-Speech, but it requires Html 5 to play without clicking/download. Ref: http://weston.ruter.net/projects/google-tts/

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top