屏幕阅读器(讲述人)不阅读 chrome 浏览器上的按钮文本

问题描述 投票:0回答:1

我对 Chrome 浏览器中的屏幕阅读器(Windows 旁白)有疑问。

我有一个按钮标签,它将聚焦于 Tab 键按下。我希望屏幕阅读器能读出它是什么按钮,但当它聚焦时它说“没有项目在视图中”。

我已经添加了 role="button" 但它并没有帮助我,而且我改为 input element() 仍然没有运气。

这是该页面的 HTML 代码。

<button class="k-primary k-button bold applicant-form-cancel-button" role="button" aria-label="Cancel"
                        id="btnCancel">Cancel</button>

对此有任何评论将不胜感激。

button roles wai-aria screen-readers narrator
1个回答
0
投票

这是一个较旧的问题,但它似乎不再是一个问题。在 Windows 10 版本 22H2 上,上述按钮元素在 Windows 讲述人(默认设置)上显示为“取消按钮”。

© www.soinside.com 2019 - 2024. All rights reserved.