-
Notifications
You must be signed in to change notification settings - Fork 25
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
Is it possible to disable the auto focus on first element? #108
Comments
Hey @acespace90, thanks for the question. Which component(s) are you referring to? In order to be properly accessible, it's often recommended that focus is shifted to the newly activated element or a child. See Modal WAI focus guidelines, for example. If you can let me know the behaviour you're hoping for (or what you're trying to avoid), we can try to suggest some approaches. |
Hi @adamduncan, I refer to the dialog component. I noticed that if I have a select as the first element of the modal, followed by some text, the screen reader does not interact properly with the select and continues with the reading of the text. But if I manually force the tab on select, then the screen reader reads it correctly. I hope I explained myself. |
Interesting. What screenreader/browser combo are you using? What elements are being used for the custom select menu? I wonder whether it might be related to that. The modal will automatically look for these focusable child elements. (The Authoring Practices modal example does a similar thing, but in a more programmatic way.) If the select is a native |
I’m using Chrome on Mac with system screen reader. The select is 100% native and has no negative tabindex, only the external container is styled. |
Ah, right. That's great then. Voiceover announces the modal title and dictates all modal content before announcing the focused element. Here's an example - after the content, Voiceover will announce |
Mmmh, no because it reads the text after the |
@acespace90 can you provide a code example? That way we can test exactly what happens. Also note that VoiceOver doesn’t support Chrome; it may work in certain cases, but it’s not supported from within Apple. As for the focusables, the close button should be first in that order. Alternatively you can set focus on the dialog itself. |
Is it possible to disable the auto focus on first element? It would be nice if there was an option.
Thanks
The text was updated successfully, but these errors were encountered: