Initial Focus in Dialog with Content inside Slot #481
Unanswered
timgoeller
asked this question in
Help
Replies: 1 comment
-
Had the same problem today. Just build an |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've extended the Dialog component with general styling, so I can reuse it in my project. Because of that, my
Modal
component, which includes theDialog
component uses a slot for its content. However, there are some cases where I want to set theinitialFocus
.There seems to be no straightforward / modular way to get the ref of the element I want to focus initially out of the slot. I think it would be very nice if
tabindex
was supported, so that theDialog
-content can handle tab-order freely. What would be the best-practice way to accomplish this at the moment?Beta Was this translation helpful? Give feedback.
All reactions