FreedomScientific / standards-support

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

"The focus does not move correctly when there is a change of element using .focus()" #809

Open xblanch opened 4 months ago

xblanch commented 4 months ago

Summary

The scenario in which the error has been detected is a button that, when pressed, opens a modal window, and the focus does not move to the first form element of the modal, although there is a focus() function. This behavior is detected when the form mode is set to manual. To simplify the example, a code has been reproduced with a button that, when executed, moves the focus to an input that is located after a text paragraph: link to code

Steps to reproduce

  1. Verify that the form mode is set to manual.
  2. Find the button "Click me to send focus to input".
  3. Press Enter to activate.
  4. Press Insert + Tab to receive information about the focused element. Jaws says, "Click me to send focus to input, button".
  5. Press Tab. Jaws verbalizes "Second button". From this test, it is deduced that Jaws does not detect the focus change and does not verbalize the input on which the focus has been placed.
  6. Repeat steps 1 through 4. After activating the button, read with the down arrows. It will be noticed that the focus has not moved from the button.

Expected result

The focus should be placed on the element to which the focus is sent. With automatic form mode, the focus is placed in the input, and the form mode is activated. With manual form mode, when navigating with arrows after pressing the button that triggers the action, it seems to be in the same place.

Actual result

The information transmitted by Jaws when navigating with arrows or obtaining the active element with Insert + Tab does not indicate that the focus has moved. However, when tabbing, the focus goes to the next element than it should have received focus.

Example

link to code

Additional Information

JAWS version and build number

JAWS 2024.2312.53

Operating System and version

Windows 11

Browser and version:

The issue has been observed in Google Chrome 121.0.6167.161 and Microsoft Edge 121.0.2277.112.

stevefaulkner commented 4 months ago

@xblanch tested using test case cannot reproduce with

JAWS version and build number

JAWS 2024.2312.53

Operating System and version

Windows 11

Browser and version:

The issue has been observed in Google Chrome 121.0.6167.161

xblanch commented 4 months ago

@stevefaulkner I've checked that if you reach the initial button with tabs or by pressing 'b' and click, it works correctly. If you reach the button by navigating with arrows and pressenter, then the focus doesn't move. Also, I've noticed that setting 'Link Activation' to 'Enter' triggers the issue I mentioned. If I have the option set to 'click', it only fails occasionally. Could you please try it? Thanks.