"The focus does not move correctly when there is a change of element using .focus()"
Opened this issue · 2 comments
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
- Verify that the form mode is set to manual.
- Find the button "Click me to send focus to input".
- Press Enter to activate.
- Press Insert + Tab to receive information about the focused element. Jaws says, "Click me to send focus to input, button".
- 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. - 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
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 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.