FreedomScientific / standards-support

Contains documentation for Vispero software support of Web standards
https://freedomscientific.github.io/standards-support/
GNU General Public License v3.0
110 stars 12 forks source link

Virtual PC Cursor becomes lost with programmatic focus shifts to list elements #686

Open Epic-Third-Party-Bug-Reporting opened 1 year ago

Epic-Third-Party-Bug-Reporting commented 1 year ago

Summary

If a page programmatically assigns focus to a list element or element within a list element, the JAWS Virtual PC Cursor can become unresponsive.

Example:

  1. Construct an unordered list with several elements, and mark at least one element with tabindex="-1" to allow it to receive programmatic focus.
  2. Optionally place traditionally focusable elements, such as <button> elements, inside the list elements.
  3. Construct a button or similar method outside of the list, and attach an event listener which can call .focus() on the list element or focusable element within the list.
  4. Observe that the list can be navigated with Virtual PC Cursor at first, but after triggering the .focus() call, it no longer can.

Expected result

Actual result

Example

https://jsfiddle.net/1gy46oz8/9/ This fiddle includes a simple 5-element list where each element contains a button. Buttons to focus on the 3rd list element and on the button within are both provided. Additionally, a button to goggle the list-style CSS property is provided to demonstrate that the issue is not specific to lists with list-style: none.

Note: If focusing on the list element, the user must press Tab twice to restore Virtual PC Cursor navigation - a single Tab moves focus from the list element to the button within and Virtual PC Cursor navigation remains broken. Successfully tabbing to the button within the following list element restores Virtual PC Cursor navigation.

Additional Information

JAWS seems to lag significantly after the user attempts to use Virtual PC Cursor navigation in this state. JAWS response to any inputs becomes noticeably slower after the user attempts to use Virtual PC Cursor navigation following the .focus() call.

This lag is not present if the user immediately uses the Tab key after the .focus() call and successfully avoids the issue. It is specifically the attempt to use Virtual PC Cursor navigation in this state that appears to cause the lag.

JAWS version and build number

Tested on each of the following JAWS builds:

  1. 2022.2206.9
  2. 2022.2211.7
  3. 2023.2210.29

Operating System and version

Windows 10 Enterprise 10.0.19044 Build 19044

Browser and version:

Chrome 108.0.5359.125

JAWS-test commented 1 year ago

I can confirm the bug. It occurs not only in Chrome, but also in Firefox and Edge

The bug does not occur with NVDA.

I have also noticed the bug annoyingly for years.

The cause of the bug is the following behavior of JAWS:

This is a JAWS bug because the focusable list items are correctly submitted by the browser to the Accessiblity API as a list and not a select list