【问题标题】:How to hide an element from screen reader/voiceover如何从屏幕阅读器/画外音中隐藏元素
【发布时间】:2016-11-17 15:48:34
【问题描述】:

我添加了以下html

<a href="url" aria-hidden="true">Read more</a>

从屏幕阅读器中隐藏此元素,但屏幕阅读器仍然是 Read more

我也尝试使用tabindex=-1 到这个锚标记及其外部 div,但屏幕阅读器仍然读取Read more 文本。

有没有办法从屏幕阅读器中隐藏它?

【问题讨论】:

  • 它说aria-hidden 受mac 上的chrome 支持。但不在 chrome 上与我合作。
  • 如果您使用的是 VoiceOver,请使用 Safari,而不是 Chrome。 VoiceOver 用户通常不使用 Chrome(我在现实世界中没有遇到过),因为 VO 已针对 Safari 进行了优化。
  • 我正在使用 chrome 的 screen reader 扩展。
  • 您可能想查看Screen Reader / Browser Combinations 和Screen Readers Commonly Used。我不建议将 Chromevox 与 Chrome 一起用作测试页面的主要工具。

标签: html wai-aria screen-readers


【解决方案1】:

可能会有所帮助:

Notes on using ARIA in HTML

使用 ARIA 的第四条规则

不要在可见的地方使用 role="presentation" 或 aria-hidden="true" 可聚焦元素。

【讨论】:

    【解决方案2】:

    您尝试过使用 role="presentation" 吗?它也适用于 chrome。

    问候, 萨钦

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-09-27
      • 1970-01-01
      • 2021-11-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-03-11
      相关资源
      最近更新 更多