-
Notifications
You must be signed in to change notification settings - Fork 811
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
[added] support Array, HTMLCollection and NodeList values for appElement #861
Conversation
Looks great. Bom trabalho!
Any thoughts? |
That is a possibility. Proactively getting rid of dead elements would probably require adding something like a Should I add that sort of filter? |
Yeah, totally agree. I don't know if we should be defensive in this case, or, just write it in the docs warning about it. |
Thanks, @eemeli. |
Any chance of getting a release including this sometime soon? 😇 |
Sorry for taking soooo long...released version 3.13.1. |
Changes proposed:
appElement
propWhile working with an application that uses more than one top-level element, it became obvious that providing a fully accessible experience via react-modal is challenging, as it's currently only able to hide one app element.
The fix for this is pretty simple, and should have no effect on existing users. The accepted shape of the
appElement
value now also includes Array, HTMLCollection (returned bydocument.getElementsBy*
) and NodeList (returned bydocument.querySelectorAll
).As a result of this change, it becomes easier to use react-modal to provide a fully accessible experience.
Acceptance Checklist:
CONTRIBUTING.md
.