Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Accessibility: ACC-273.2] Dialog: Focus lost on closing the dialog #12768

Closed
divyamalhotra488 opened this issue Nov 25, 2024 · 0 comments · Fixed by #12831
Closed

[Accessibility: ACC-273.2] Dialog: Focus lost on closing the dialog #12768

divyamalhotra488 opened this issue Nov 25, 2024 · 0 comments · Fixed by #12831
Assignees

Comments

@divyamalhotra488
Copy link

divyamalhotra488 commented Nov 25, 2024

Is this a bug, enhancement, or feature request?

Bug

Describe your proposal.

Focus should not be lost on closing the dialog, either the focus should be retained on the button or on the next active UI element.

Can you handle that on the application side

No

Which versions of Angular and Fundamental Library for Angular are affected? Please, specify the exact version. (If this is a feature request, use current version.)

All

If this is a bug, please provide steps for reproducing it; the exact components you are using;

Component used: Dialog

  1. Create a component based dialog that has complex body with different ngx components.
  2. Access the dialog button using keyboard Tab and close with Tab key.
  3. Once closed, focus get closed from the dialog button and comes to top screen element.
    Screenshot 2024-11-25 at 3 33 30 PM

Please provide relevant source code (if applicable).

Please provide stackblitz example(s).

You can try ngx examples, issue is reproducible there.

In case this is Accessibility related topic, did you consult with an accessibility expert? If not, please do so and share their recommendations.

Yes, issue is raised by an accessibility expert.

Did you check the documentation and the API?

Yes

Did you search for similar issues?

Is there anything else we should know?

IMPORTANT: Please refrain from providing links or screenshots of SAP's internal information, as this project is open-source, and its contents are accessible to anyone.

@droshev droshev added this to the Sprint 140 - November 2024 milestone Nov 25, 2024
khotcholava added a commit that referenced this issue Dec 9, 2024
closes [#12768](#12768)

Ensure the button does not lose focus after the dialog is closed, improving usability and navigation flow.
mikerodonnell89 added a commit that referenced this issue Jan 15, 2025
* feat(core): dialog focus trap

closes [#12768](#12768)

Ensure the button does not lose focus after the dialog is closed, improving usability and navigation flow.

* fix(core): renaming, prevent console error if no active element

* fix: lint and test

---------

Co-authored-by: [email protected] <[email protected]>
Co-authored-by: Mike O'Donnell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants