Skip to content

Issue with aria-modal="true" role="dialog", after announcing everything, even though we've not tabbed away, NVDA focus on last announced element #17650

@BojanSlavkovskii

Description

@BojanSlavkovskii

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.
Image

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?

  • Yes

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?

  • Yes

Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?

  • Yes

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions