JAWS键盘快捷键在aria role =“gridcell”上触发点击事件

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

我正面临一个问题,当一个JAWS特定的键盘快捷键被使用时,JAWS正在触发点击事件,同时一个网格单元被聚焦,而JAWS处于表格模式。

下面的示例将最终产生我描述的行为:我发现在Firefox和JAWS 17中重现此行为最容易:

<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head><title>clicking issue</title></head>
<body>
      <table role="grid" summary="sample">
        <tbody>
            <tr>
                   <td>
                         <a href="#" onclick="alert(event.type);">Gridcell Role Cell</a>
                   </td>
            </tr>
            <tr>
                   <td>
                         <input type="checkbox" name="testcheckbox">Gridcell Checkbox
                   </td>
            </tr>
        </tbody>
      </table>


      <input type="checkbox" name="testcheckbox2">Non-Gridcell Checkbox 2
</body>
</html>

如果您选项卡导航到“Click ME”单元格并使用JAWS键盘快捷键,例如insert + ctrl + b(在页面快捷方式上显示按钮),在焦点元素上触发click事件并显示JS警报,报告“click”事件。

这是JAWS的预期行为吗?使用键盘shrotcut时,如何避免触发元素?

accessibility roles wai-aria jaws-screen-reader
1个回答
0
投票

试过你的示例代码。删除role="grid"适用于IE11和JAWS17。

要获取复选框列表,请按insert+ctrl+x。如果我们有role="grid"然后复选框切换,同时按insert+ctrl+x

<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
    <title>clicking issue</title>
</head>
<body>
    <table summary="sample">
        <tbody>
            <tr>
                <td>
                    <a href="#" onclick="alert(event.type);">Gridcell Role Cell</a>
                </td>
            </tr>
            <tr>
                <td>
                    <input type="checkbox" name="testcheckbox" id="gcCheckbox"><label for="gcCheckbox">Gridcell Checkbox</label>
                </td>
            </tr>
        </tbody>
    </table>


    <input type="checkbox" name="testcheckbox2" id="nonGcCheckbox"><label for="nonGcCheckbox">Non-Gridcell Checkbox 2</label>
</body>
</html>
© www.soinside.com 2019 - 2024. All rights reserved.