我如何让 IE 和 Firefox 尊重 aria-hidden 属性?
How do I get IE and Firefox to respect the aria-hidden property?
我正在处理网站的一部分,该部分使用通用符号来表示特定文本,但不希望屏幕 reader 读取该符号,而是描述该符号的含义.
例如:
You'll get a free iPad∞.
其中∞表示"If you win the contest"。此文本显示在网站的其他地方。
在源代码中,我有以下内容:
You'll get a free iPad<acronym title="If you win the contest"><span aria-hidden="true">∞</span></acronym>
这在 Chrome 中工作正常并正确显示 "If you win the contest",但在 Firefox 和 IE 中它读取 ∞ 为 "Infinity"。
我是否遗漏了一些可以帮助 IE/Firefox 知道在这种情况下该怎么做的东西?
如果重要的话,我使用的是 Firefox 48.0.2、IE 11 和 Chrome 53.0.2785.116 m
将评论转化为答案以便接受(尽管 OP 可以做同样的事情并接受 his/her 自己的答案)。
- Firefox/NVDA 不读无限符号。
- IE/NVDA 不读取无限符号但读取标题值。
- Chrome 与 NVDA 不兼容。
笔数:http://s.codepen.io/aardrian/debug/VKPwrV
NVDA用户一般不使用Chrome。我会说 "never," 但有时他们 mis-click。 Re-tested 没有鼠标(可以肯定的是,因为悬停会导致宣布无穷大)。我正在使用 NVDA 2016.2 和 NVDA 2016.3。在 Firefox 48.0.2 中我听到 "You'll get a free ipad if you win the contest." 在 IE11 中我听到 "You'll get a free ipad if you win the contest."
如果您使用(鼠标)指针悬停在符号上,屏幕 reader 会宣布它。
通常情况下,SR 用户会通过键盘导航页面,找到他或她想要的部分,然后阅读。按标题、地标、列表等跳转是很常见的。屏幕 reader 用户通常不会使用鼠标上网(但并非所有 SR 用户都是完全失明的)。
我的建议是您可以保留代码原样(尽管将 <acronym>
替换为 <abbr>
)。
我正在处理网站的一部分,该部分使用通用符号来表示特定文本,但不希望屏幕 reader 读取该符号,而是描述该符号的含义.
例如:
You'll get a free iPad∞.
其中∞表示"If you win the contest"。此文本显示在网站的其他地方。
在源代码中,我有以下内容:
You'll get a free iPad<acronym title="If you win the contest"><span aria-hidden="true">∞</span></acronym>
这在 Chrome 中工作正常并正确显示 "If you win the contest",但在 Firefox 和 IE 中它读取 ∞ 为 "Infinity"。
我是否遗漏了一些可以帮助 IE/Firefox 知道在这种情况下该怎么做的东西?
如果重要的话,我使用的是 Firefox 48.0.2、IE 11 和 Chrome 53.0.2785.116 m
将评论转化为答案以便接受(尽管 OP 可以做同样的事情并接受 his/her 自己的答案)。
- Firefox/NVDA 不读无限符号。
- IE/NVDA 不读取无限符号但读取标题值。
- Chrome 与 NVDA 不兼容。
笔数:http://s.codepen.io/aardrian/debug/VKPwrV
NVDA用户一般不使用Chrome。我会说 "never," 但有时他们 mis-click。 Re-tested 没有鼠标(可以肯定的是,因为悬停会导致宣布无穷大)。我正在使用 NVDA 2016.2 和 NVDA 2016.3。在 Firefox 48.0.2 中我听到 "You'll get a free ipad if you win the contest." 在 IE11 中我听到 "You'll get a free ipad if you win the contest."
如果您使用(鼠标)指针悬停在符号上,屏幕 reader 会宣布它。
通常情况下,SR 用户会通过键盘导航页面,找到他或她想要的部分,然后阅读。按标题、地标、列表等跳转是很常见的。屏幕 reader 用户通常不会使用鼠标上网(但并非所有 SR 用户都是完全失明的)。
我的建议是您可以保留代码原样(尽管将 <acronym>
替换为 <abbr>
)。