bas*_*aus 8 html5 accessibility wai-aria
在我的HTML文档中,我使用的是罗马数字(例如:MMXV = 2015).
有没有办法通知屏幕阅读器以另一种方式解释某些文本(例如:罗马数字为"二千一十五"而不是MMXV)?
我的猜测是会有一个ARIA属性,但我似乎无法找到它.例如:
<time datetime="2015" aria-?="Two thousand and fifteen">MMXV</time>
Run Code Online (Sandbox Code Playgroud)
使用aria-label标签为元素提供有意义的描述.
然后,通过将它们span包含在aria-hidden属性设置true为隐藏屏幕阅读器元素的元素中,将屏幕阅读器中的罗马数字隐藏起来.
<time datetime="2015" aria-label="Two thousand and fifteen">
<span aria-hidden="true">MMXV</span>
</time>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2399 次 |
| 最近记录: |