diff --git a/README.md b/README.md index 2c5b244c..fd01daa7 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,9 @@ const customStyles = { } }; +// Make sure to bind modal to your appElement (http://reactcommunity.org/react-modal/accessibility/) +Modal.setAppElement('#yourAppElement') + class App extends React.Component { constructor() { super(); diff --git a/docs/accessibility/README.md b/docs/accessibility/README.md index 8208a12a..09480de2 100644 --- a/docs/accessibility/README.md +++ b/docs/accessibility/README.md @@ -29,6 +29,9 @@ If you are already applying the `aria-hidden` attribute to your app content through other means, you can pass the `ariaHideApp={false}` prop to your modal to avoid getting a warning that your app element is not specified. +Using `Modal.setAppElement` will not embed react-modal into your react app as +a descendent component. It will just help boost up the app accessiblity. + ### Keyboard navigation {#keyboard} When the modal is opened, it restricts keyboard navigation using the tab key to