Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0339ed5

Browse files
committedApr 8, 2023
[chore] readd setAppElement example
1 parent 1520830 commit 0339ed5

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed
 

‎README.md

+1
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ There are several demos hosted on [CodePen](https://codepen.io) which
123123
demonstrate various features of react-modal:
124124

125125
* [Minimal example](https://codepen.io/neilhsmith/pen/QWVVEEg)
126+
* [Using setAppElement](https://codepen.io/neilhsmith/pen/JjmoaOV)
126127
* [Using onRequestClose](https://codepen.io/neilhsmith/pen/OJooXBg)
127128
* [Using shouldCloseOnOverlayClick](https://codepen.io/neilhsmith/pen/wvEYxKa)
128129
* [Using inline styles](https://codepen.io/neilhsmith/pen/gOdZPPP)

‎docs/examples/set_app_element.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Using setAppElement
2+
3+
This example shows how to use setAppElement to properly hide your application from screenreaders and other assistive technologies while the modal is open.
4+
5+
You'll notice in this example that the aria-hidden attribute is applied to the #main div rather than the document body.
6+
7+
[setAppElement example](https://codepen.io/neilhsmith/pen/JjmoaOV)

0 commit comments

Comments
 (0)
Please sign in to comment.