[英]How to hide an element from screen reader/voiceover
I have added the following html 我添加了以下html
<a href="url" aria-hidden="true">Read more</a>
to hide this element from screen reader but the screen reader still the Read more
隐藏屏幕阅读器中的此元素,但屏幕阅读器仍为“ Read more
I have also tried with tabindex=-1
to this anchor tag and to its outer div but still the screen reader read the Read more
text. 我还尝试了使用tabindex=-1
将此锚标签及其外部div,但是屏幕阅读器仍在阅读Read more
文本。
Is there any way to hide it from the screen reader? 有什么办法可以将其从屏幕阅读器中隐藏吗?
may be helpful: 可能会有帮助:
Notes on using ARIA in HTML 在HTML中使用ARIA的注意事项
Fourth rule of ARIA use ARIA使用的第四条规则
Do not use role="presentation" or aria-hidden="true" on a visible focusable element . 不要在可见的可聚焦元素上使用role =“ presentation”或aria-hidden =“ true”。
Have your tried using role="presentation" ? 您尝试过使用role =“ presentation”吗? It also work for chrome. 它也适用于铬。
Regards, sachin 问候,萨钦
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.