How do you make the Loading icon accessible for screen-readers like JAWS?

守給你的承諾、 提交于 2019-12-06 07:39:08

问题


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


回答1:


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>


来源:https://stackoverflow.com/questions/31716425/how-do-you-make-the-loading-icon-accessible-for-screen-readers-like-jaws

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