-
-
Notifications
You must be signed in to change notification settings - Fork 647
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
Disable autofocus of step content via step options #2117
Comments
@DaDom I think we should find a way to add arbitrary elements into the focus trap that we implement. That way, we can keep what we have, but also allow adding more possible focus targets into the mix. |
Great, that makes sense. focusableElements?: HTMLElement | HTMLElement[] | string | string[] | (() => HTMLElement | HTMLElement[] | string | string[] | null | undefined) Providing a value for this option will:
Is that what you had in mind? |
Alternatively, following your existing approach of finding all focusable elements here, we might also do the same inside of the resulting HTMLElement of interface StepOptionsAttachTo {
element?: HTMLElement | string | (() => HTMLElement | string | null | undefined);
on?: PopperPlacement;
focusable?: boolean;
} Let me know what you think! |
Me too!! (Exact workflow: click an element inside the highlighted element -> an input appears that increases the highlighted element -> the input gets focused -> shepherd does a redraw -> the focus of input gets lost -> input disappear) |
hi , is there any update on this bug, i am not able to highlight input element, but for text area it works fine |
hi this is reply to my question , for me it was not working because i was trying to open them in mat-dialog but and i had to remove and it started working , thank you |
Hey! I think the option of configuring the For the moment, what works for my case is set the focus with a timeout, to override the autofocus on the current step. In this example the
Hope it helps, and keep waiting for the improvement! |
Hey there!
I'd like to "re-discuss" #1588 - I have the same use case, in which I would like to keep an input in the highlighted app part focused, and not have the step popup take focus away. Currently, you use
floating-ui
to focus the step element after 300ms timeout (see here).I understand that this is something where you would like to figure out a general strategy around a11y. In my case, I would however rather disable this behavior entirely via some step option
autoFocus = false
or something like that.Would you accept a PR that introduces this ability, or you would not like to have such changes until you have a clearer position on this topic overall?
The text was updated successfully, but these errors were encountered: