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

[bug] <rh-dialog> keyboard focus issue #1238

Open
heyMP opened this issue Sep 26, 2023 · 6 comments
Open

[bug] <rh-dialog> keyboard focus issue #1238

heyMP opened this issue Sep 26, 2023 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@heyMP
Copy link
Member

heyMP commented Sep 26, 2023

Describe the bug

Triggering an rh-dialog component to "open" via a keyboard, the focus doesn't correctly transition from the trigger button to the open dialog. The focus remains on the trigger.

Which Component?

rh-dialog

Steps to reproduce

  1. Go to https://ux.redhat.com/elements/dialog/demo/
  2. Using your keybaord, tab to the first "open" button
  3. Hit "Enter"
  4. Verify that the focus has remained on the "open"button

Expected behaviour

The focus should move the the dialog element when the trigger is clicked and focus moved back to the trigger button when the dialog is closed

Screenshots

Screenshot 2023-09-26 at 10 31 02 AM
Screenshot 2023-09-26 at 10 31 08 AM

Element HTML

No response

Operating System (OS)

macOS

Browser

Chrome

More browser information

No response

Additional Info

No response

@heyMP heyMP added the bug Something isn't working label Sep 26, 2023
@heyMP heyMP moved this from Backlog to Todo in Red Hat Design System Sep 26, 2023
@heyMP heyMP self-assigned this Sep 26, 2023
@heyMP
Copy link
Member Author

heyMP commented Sep 26, 2023

I have a fix from rhpt-elements that I can put into a PR.

@bennypowers
Copy link
Member

we should just use <dialog> internally https://caniuse.com/dialog

@brianferry
Copy link
Collaborator

@bennypowers - Switching to dialog internally was going to be the follow up #1242

@bennypowers
Copy link
Member

bennypowers commented Oct 15, 2023

<dialog> provides browser-built-in focus trap. should we spend time implementing that in javascript now then immediately turn around and delete that code? even if it's blocking release, we might reasonably estimate the amount of testing and qa of both approaches to be roughly equivalent. wdyt @nikkimk ?

@hellogreg hellogreg changed the title [bug] <rh-dialog> [bug] <rh-dialog> keyboard focus issue Feb 8, 2024
@markcaron markcaron assigned adamjohnson and unassigned heyMP Aug 22, 2024
@markcaron
Copy link
Collaborator

@adamjohnson can you look into this for Clefairy?

@markcaron
Copy link
Collaborator

Seems like this may now be something that could be fixed in #1242

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: In Progress 🟢
Status: In Progress 🟢
Development

Successfully merging a pull request may close this issue.

5 participants