Skip to content

Commit fa87046

Browse files
daiyanzediasbruno
authored andcommitted
[Chore] update README.md: added description for setting app element
update README.md: added description for setting app element.
1 parent 6290db5 commit fa87046

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ const customStyles = {
5050
}
5151
};
5252

53+
// Make sure to bind modal to your appElement (http://reactcommunity.org/react-modal/accessibility/)
54+
Modal.setAppElement('#yourAppElement')
55+
5356
class App extends React.Component {
5457
constructor() {
5558
super();

docs/accessibility/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ If you are already applying the `aria-hidden` attribute to your app content
2929
through other means, you can pass the `ariaHideApp={false}` prop to your modal
3030
to avoid getting a warning that your app element is not specified.
3131

32+
Using `Modal.setAppElement` will not embed react-modal into your react app as
33+
a descendent component. It will just help boost up the app accessiblity.
34+
3235
### Keyboard navigation {#keyboard}
3336

3437
When the modal is opened, it restricts keyboard navigation using the tab key to

0 commit comments

Comments
 (0)