Commit 9089a2d
committed
[fixed] Make the modal portal render into body again (#176)
In c13fed9 behavior was changed
so that the modal portal ended up rendering into the app element.
In the default case where the appElement receives aria-hidden
when the modal is open, this meant that the modal itself was
also contained inside the aria-hidden element. This limits the
ability for screenreaders to read the modal contents.
Server-side rendering should not be affected by this change
because componentDidMount is only fired on the client-side thus
having a reference to document.body there should be acceptable.
Upgrade Path:
- Make sure that you are setting an app element (rather than
using the default document.body) so that modal contents are
not being aria-hidden1 parent e9aff7a commit 9089a2d
2 files changed
Lines changed: 4 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | 29 | | |
43 | 30 | | |
44 | 31 | | |
| |||
54 | 41 | | |
55 | 42 | | |
56 | 43 | | |
57 | | - | |
| 44 | + | |
58 | 45 | | |
59 | 46 | | |
60 | | - | |
| 47 | + | |
61 | 48 | | |
62 | 49 | | |
63 | 50 | | |
| |||
0 commit comments