在屏幕阅读器中暂停可访问性 [英] Pausing in a screen reader for accessibility

查看:129
本文介绍了在屏幕阅读器中暂停可访问性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用Mac OSX的内置屏幕阅读器来测试我的网站,我知道这不是最好的,但它是我现在的所有。但我发现它不是暂停在元素的结束...这是有道理的;但我发现自己放置隐藏的时期,以使事情可读:

 < div class =breakdown> 
< strong> 35< / strong>新< span class =visuallyhidden>。< / span>< br>
< strong> 4< / strong>逾期< span class =visuallyhidden>。< / span>
< / div>

我觉得很脏这样做,但如果我不然,那么它会破坏设计,



有没有人有这样的经验?

解决方案

如果你在语义上格式化代码,它应该工作正常。通过HTML结构的外观,您正在使用< br> 标记来进行演示。这不是换行符是什么意思,因此不是标记的语义使用。



你特别希望每一行都是分开的,所以你应该把它们放在包装块级标签。您可以将每行包装在 p div 标签中,然后屏幕阅读器将它们正确分开。 p>

I have been using the Mac OSX's built in screen-reader for testing my site, I know it's not the best but it's all I have for now. But I'm finding it isn't pausing at the end of elements... which makes sense; but I'm finding myself placing hidden periods to make things readable:

<div class="breakdown">
    <strong>35</strong> New<span class="visuallyhidden">.</span><br>
    <strong>4</strong> Overdue<span class="visuallyhidden">.</span>
</div>

I feel really dirty doing this, but if I dont then either it ruins the design, or it is read in a continuous sentence which is not comprehensible.

Does anyone have an experience of this kind of thing to offer?

解决方案

If you format your code semantically, it should work fine. By the looks of your HTML structure, you're using a <br> tag for presentational purposes. This is not what line breaks are meant for, and thus is not a semantic use of markup.

You specifically want each line to be separate, so you should put them in wrapping block level tags. You could wrap each line in a p or div tag, and then the screen reader will separate them properly.

这篇关于在屏幕阅读器中暂停可访问性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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