如何在元素上使用听觉样式表? [英] How is it possible to use aural style sheets on elements?

查看:165
本文介绍了如何在元素上使用听觉样式表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

刚刚搜索的网络,并提出了以下代码。当我在Firefox4和Safari上运行它们,我似乎没有听到任何东西。我如何解决这个问题?

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>


推荐答案

听觉样式表供屏幕阅读者阅读您在样式表开头看到的 aural 媒体类型),而不是浏览器要呈现的媒体类型。这就是为什么你的浏览器不会说什么。

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.

听觉风格表在CSS2.1规范,但已被 CSS3语音模块取代。它不知道什么样的支持存在任何规范,虽然,因为大多数屏幕阅读器在使用中只是读出浏览器呈现和显示。

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.

这篇关于如何在元素上使用听觉样式表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆