How is it possible to use aural style sheets on elements?

人盡茶涼 提交于 2019-12-31 03:55:10

问题


Just searched the Net and came up with the following codes..When I run them on Firefox4 and Safari, I don't seem to hear anything..How can I fix this?

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
@media aural {
h1, h2, h3, 
h4, h5, h6    { voice-family: paul, male; stress: 20; richness: 90 }
h1            { pitch: x-low; pitch-range: 90 }
h2            { pitch: x-low; pitch-range: 80 }
h3            { pitch: low; pitch-range: 70 }
h4            { pitch: medium; pitch-range: 60 }
h5            { pitch: medium; pitch-range: 50 }
h6            { pitch: medium; pitch-range: 40 }
li, dt, dd    { pitch: medium; richness: 60 }
 dt            { stress: 80 }
pre, code, tt { pitch: medium; pitch-range: 0; stress: 0; richness: 80 }
em            { pitch: medium; pitch-range: 60; stress: 60; richness: 50 }
strong        { pitch: medium; pitch-range: 60; stress: 90; richness: 90 }
dfn           { pitch: high; pitch-range: 60; stress: 60 }
s, strike     { richness: 0 }
i             { pitch: medium; pitch-range: 60; stress: 60; richness: 50 }
b             { pitch: medium; pitch-range: 60; stress: 90; richness: 90 }
u             { richness: 0 }
 a:link        { voice-family: harry, male }
 a:visited     { voice-family: betty, female }
a:active      { voice-family: betty, female; pitch-range: 80; pitch: x-high }
}
</style>
</head>

<body>
<p id="a" class="heidi">Testing</p>
 <p id="b" class="peter">Testingb</p>
 <h2>Heading2</h2>
</body>
<html>

回答1:


Aural style sheets are for screen readers to read (hence the aural media type you see in the beginning of the style sheet), not for browsers to render. That's why your browser doesn't say anything.

They're accessibility tools for people with visual impairments, who need to rely on hearing rather than vision to peruse Web sites.

Aural style sheets are described in the CSS2.1 spec, but have been superseded by the CSS3 Speech Module. It is not known what kind of support exists for either specification, though, as most screen readers in use simply read off what a browser renders and displays.



来源:https://stackoverflow.com/questions/6607571/how-is-it-possible-to-use-aural-style-sheets-on-elements

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!