【发布时间】:2019-08-23 23:30:11
【问题描述】:
我最近发现,当可聚焦元素中包含一些内容并分配了 aria-labelledby 属性时,MacOS 的 VoiceOver 不会读取标签内的内容,而是读取焦点组件的内容
在不同的浏览器上尝试过:在 Safari (11.1.1) 中按预期工作,但在 Chrome (76.0.3809.100) 中失败。 还尝试改变两个元素的角色。
<p id="header">This text should be read</p>
<div tabindex="0" aria-labelledby="header">
<span>Click me</span>
<p>This text should not be read</p>
</div>
https://jsfiddle.net/2d9jn4hs/
当您在启用 VoiceOver 的情况下专注于 div 时,我希望听到 This text should be read 但会听到 Click me This text should not be read。
有什么建议吗?
【问题讨论】:
标签: html accessibility wai-aria voiceover screen-readers