Skip to content

Commit

Permalink
[Chore] update README.md: added description for setting app element
Browse files Browse the repository at this point in the history
update README.md: added description for setting app element.
  • Loading branch information
daiyanze authored and diasbruno committed Mar 13, 2018
1 parent 6290db5 commit fa87046
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
3 changes: 3 additions & 0 deletions docs/accessibility/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fa87046

Please sign in to comment.