From fa870464786d40835be7901f8ed6ca11be621e62 Mon Sep 17 00:00:00 2001 From: Yanze Dai Date: Tue, 13 Mar 2018 21:21:09 +0900 Subject: [PATCH] [Chore] update README.md: added description for setting app element update README.md: added description for setting app element. --- README.md | 3 +++ docs/accessibility/README.md | 3 +++ 2 files changed, 6 insertions(+) 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