-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[Dialog] does not scope tabbing #156
Comments
It would be good too if it has a feature to set the default button autofocused just like a normal dialog behaves. :) |
Interesting that this is labeled "feature request". I would rather say this is a bug. There isn't anyone that excepts you to focus and also edit elements under a overlay. |
@EloB agreed |
Can we look at the implementations in these libs: they both support the correct behaviour here |
Spec also requires this behaviour: https://www.google.com/design/spec/components/dialogs.html#dialogs-behavior
|
@nathanmarks I agree -- first time seeing this issue. I'll explore this more as this really needs to get fixed. |
I started looking into this. Would you be open to the idea of drawing aspects from both the https://github.com/reactjs/react-modal repo that @ryanflorence shared a long! time ago and
Edit: Changed my mind |
Well well... maybe i'll try |
Just an update here. I have a dialog rewrite ready (will be submitting it after the styling update) with a much improved API and this issue fixed. |
Accessible dialogs need to scope tabbing inside the dialog:
You can see how we do it in react modal https://github.com/rackt/react-modal/blob/master/lib/helpers/scopeTab.js
There are numerous other issues, like handling a focus from the browser chrome into the app with an active dialog, it should focus the first tabbable element in the dialog. Also, after closing the dialog you need to return focus to the element that triggered the dialog to open. https://github.com/rackt/react-modal/blob/master/lib/helpers/focusManager.js
Finally, please consider this: http://instructure.github.io/blog/2014/09/25/accessible-dialogs/
The text was updated successfully, but these errors were encountered: