Steps to reproduce: Open some dialog/modal and wait everything to be announced, first focused element will be X to close the dialog and if you have buttons on bottom it will focus on the last announced element (even though it's not focusing visible, don't tab away, just press enter).
Actual behavior: It's activating the last announced button on dialog even though first focused element is button X to close the dialog and you didn't tab away from that button.
Expected behavior: It should stay on focused element and when you click enter it should not activate the last announced element but the already focused one.
NVDA logs, crash dumps and other attachments:
Uploading video is failing so hopefully this image is fine. As you can see we have only one function in HTML (that is calling the alert) other two are just closing the dialog. Initial focus is on X (we have cdkInitialFocus added but cannot be seen in this image) that works fine, everything is announced, as you can see I'm not tabbing away from the X, that's all NVDA announcements, and when I press enter, focus is moving to X and calling that function.

System configuration: Default
NVDA version: 2024.4 (2024.4.0.34423)
Windows version: Windows 10
Name and version of other software in use when reproducing the issue: Chrome
Other information about your system:
Other questions
Does the issue still occur after restarting your computer?
Have you tried any other versions of NVDA? If so, please report their behaviors.
- Yes, it works the same with every version of NVDA.
If NVDA add-ons are disabled, is your problem still occurring?
Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?
Steps to reproduce: Open some dialog/modal and wait everything to be announced, first focused element will be X to close the dialog and if you have buttons on bottom it will focus on the last announced element (even though it's not focusing visible, don't tab away, just press enter).
Actual behavior: It's activating the last announced button on dialog even though first focused element is button X to close the dialog and you didn't tab away from that button.
Expected behavior: It should stay on focused element and when you click enter it should not activate the last announced element but the already focused one.
NVDA logs, crash dumps and other attachments:
Uploading video is failing so hopefully this image is fine. As you can see we have only one function in HTML (that is calling the alert) other two are just closing the dialog. Initial focus is on X (we have cdkInitialFocus added but cannot be seen in this image) that works fine, everything is announced, as you can see I'm not tabbing away from the X, that's all NVDA announcements, and when I press enter, focus is moving to X and calling that function.

System configuration: Default
NVDA installed/portable/running from source: https://www.nvaccess.org/download/
NVDA version: 2024.4 (2024.4.0.34423)
Windows version: Windows 10
Name and version of other software in use when reproducing the issue: Chrome
Other information about your system:
Other questions
Does the issue still occur after restarting your computer?
Have you tried any other versions of NVDA? If so, please report their behaviors.
If NVDA add-ons are disabled, is your problem still occurring?
Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?