您如何使 JAWS 等屏幕阅读器可以访问加载图标? [英] How do you make the Loading icon accessible for screen-readers like JAWS?

查看:40
本文介绍了您如何使 JAWS 等屏幕阅读器可以访问加载图标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以 HTML 代码是这样的:

即使提供了 ALT 文本,在更改样式以显示图标(可见性:可见)时,在加载图标出现的时间间隔内也不会读取.

role=alert 不是一个可行的解决方案,因为这不是警报

解决方案

你需要在你的DIV属性中添加以下属性role="alertdialog" aria-busy="true" aria-live="assertive"

<img id="正在处理" src="PT_LOADING.gif" alt="正在处理...请稍候" title=""/>

So the HTML code is this:

<div style="visibility: hidden; display: none; right: 0px;"> 
<img id="processing" src="PT_LOADING.gif" alt="Processing... please wait" title=""> </div>

Even though the ALT text is provided, upon changing the style to show the icon (visibility:visible), it is not read in the time gap when the loading icon appears.

role=alert is not a feasible solution since this is not an alert

解决方案

You need to add the following attributes to your DIV attributes role="alertdialog" aria-busy="true" aria-live="assertive"

<div style="visibility: hidden; display: none; right: 0px;" role="alertdialog" aria-busy="true" aria-live="assertive"> 
<img id="processing" src="PT_LOADING.gif" alt="Processing... please wait" title="" />
</div>

这篇关于您如何使 JAWS 等屏幕阅读器可以访问加载图标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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