Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug: fix accessibility warning when open a
Modal
add the following code: componentWillMount() { Modal.setAppElement('body'); } To prevent this accessibility warning in the console, whenever the Modal opens, > Warning: react-modal: App element is not defined. Please use `Modal. setAppElement(el)` or `set appElement={el}`. This is needed so screen readers don't see main content when modal is opened. It is not recommended, but you can opt-out by setting `ariaHideApp={false}` react-modal issue-133 describes the issue, and solutions are provided in the discussion: reactjs/react-modal#133 I also summarized these solutions on StackOverflow: https://stackoverflow.com/questions/48269381/warning-react-modal-app-element-is-not-defined-please-use-modal-setappeleme/48270342#48270342 And submitted github-issue/waffle item to Udacity: https://github.com/udacity/reactnd-issues/issues/233 Also in the process to updating the documents so I can submit a PR to for related issue-576: reactjs/react-modal#576
- Loading branch information