Skip to content

Commit c47c1a2

Browse files
committed
[chore] readd setAppElement example
1 parent 1520830 commit c47c1a2

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 #root div rather than the document body.
6+
7+
[setAppElement example](https://codepen.io/neilhsmith/pen/JjmoaOV)

0 commit comments

Comments
 (0)