简体   繁体   English

JAWS 不从 IE 中的内容读取表头

[英]JAWS not reading table header from contents in IE

I have the below markup.我有以下标记。

 <!DOCTYPE html> <html> <body> <h2>HTML Table</h2> <table> <tr> <th tabIndex="0">Company</th> <th tabIndex="0">Contact</th> <th tabIndex="0">Country</th> </tr> <tr> <td>Alfreds Futterkiste</td> <td>Maria Anders</td> <td>Germany</td> </tr> <tr> <td>Centro comercial Moctezuma</td> <td>Francisco Chang</td> <td>Mexico</td> </tr> </table> </body> </html>

I am using IE11 and JAWS18.我正在使用 IE11 和 JAWS18。 When navigating with tabs, JAWS is not reading the table headers.使用选项卡导航时,JAWS 不会读取表格标题。 When I tried with the same markup in chrome and JAWS, it is reading all the table headers.当我在 chrome 和 JAWS 中尝试使用相同的标记时,它正在读取所有表头。

I also tried specified aria-label for table headers, but no use.我还尝试为表标题指定 aria-label,但没有用。

 <th tabIndex="0" aria-label="Company">Company</th> <th tabIndex="0" aria-lable="Contact">Contact</th> <th tabIndex="0" aria-label="Country">Country</th>

Can someone please tell why JAWS18 could not read table headers in IE?有人可以告诉为什么 JAWS18 无法读取 IE 中的表头吗? It could not read either from the table headers contents or from aria-label in IE.它无法从表头内容或 IE 中的 aria-label 中读取。 Also, is there any alternative for this?另外,有没有其他选择?

Add a scope attribute to the header cells, eg向标题单元格添加范围属性,例如

<th scope=“col”>Company</th>

This tells the screenreader what the relationship is between the header cells and other cells.这告诉屏幕阅读器标题单元格和其他单元格之间的关系是什么。 You don't need the tabindex or ARIA for this, just use the arrow keys to navigate instead of tabbing.为此,您不需要 tabindex 或 ARIA,只需使用箭头键进行导航而不是 Tab 键。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM