To avoid screen-reader text inside the button

≡放荡痞女 提交于 2019-12-10 17:33:09

问题


I want to ignore text inside the button when Jaws reads, My Code is :

<span style="display:none;" id="text1">Hai</span>
<button aria-labelledby="text1"><span>firstbutton</span></button>

But Jaws reads as Hai first button

Thanks in advance


回答1:


This markup is announced at 'Hai button' in Voiceover OSX 10.8.4, ChromeVox 1.29.1, and JAWS 14.

<button aria-label='Hai'>
  <span aria-hidden='true'>firstbutton</span>
</button>`


来源:https://stackoverflow.com/questions/18209327/to-avoid-screen-reader-text-inside-the-button

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