0

I'm facing an issue where JAWS is firing click events when a JAWS-specific keyboard shortcut is used while a gridcell is focused and JAWS is in Form mode.

The sample below will end up producing the behavior I described:I find it easiest to reproduce this behavior in Firefox and with 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>

If you tab navigate onto the "Click ME" cell and use a JAWS keyboard shortcut, e.g. insert+ctrl+b (display Buttons on page shortcut), a click event is fired on the focused element and the JS alert appears, reporting a "click" event.

Is this expected behavior of JAWS? How can I avoid triggering of elements when a keyboard shrotcut is used?

Bhargav Rao
  • 50,140
  • 28
  • 121
  • 140
C-Mart
  • 193
  • 8
  • I'm sorry, why do you use the `presentation` role here? AFAIK, it shouldn't be used unless you absolutely have to. – Andre Polykanine Sep 04 '16 at 17:02
  • I think that's a red herring. rule="grid" (and even no role on the table tag) produces identical behavior with regards to the clicking event problem. – C-Mart Sep 06 '16 at 13:02
  • 1
    Do you have a URL? I suspect you have a few issues stacking up here, such as `tabindex` on a `` that has its role changed within a now de-semanticized `table` along with an `a` that has no `href`. Given what I am seeing just in this code, I think seeing the entire page is necessary. – aardrian Sep 06 '16 at 19:23
  • 1
    Just performed a couple tests and I agree with @aardrian: we need a URL to pinpoint this. I couldn't reproduce this here, so probably JAWS behaves like this because of malformed HTML (no `tr`, no `href` on the link). – Andre Polykanine Sep 08 '16 at 22:21
  • Unfortunately, I don't have an externally available site to show it fully in-context. I did, however, update the sample HTML in the question to make it easier to reproduce in IE11 as well as Firefox. I'm able to get the results with the given HTML. – C-Mart Sep 13 '16 at 17:26

1 Answers1

0

Tried your sample code. Removing role="grid" works fine with IE11 and JAWS17.

To get list of check box please press insert+ctrl+x. if we have role="grid" then check box toggles while pressing 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>
  • Removing role="grid" isn't an option, the example served to exemplify the problem in its most basic form outside of my application. The aria roles are necessary. – C-Mart Oct 06 '16 at 14:51
  • Does the lack of role="grid" will skip the element when you navigate through the page? I have nested divs, forming a table (visually), which I'm trying to enhance for blind people to be able to interact as a grid or table by putting a role="grid" and on each cell role="gridcell". As far as know a plain div as a wrapper won't make a screen reader to enter in it's appropriate mode. – Vladyn Feb 12 '20 at 21:40