Skip to content

Commit 1569310

Browse files
Add explanation of setAppElement in settings
1 parent b2d76e1 commit 1569310

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

components/settings.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,24 @@ module.exports = {
2424
assetsPath = path;
2525
}
2626
},
27+
2728
getAssetsPath: () => String(assetsPath),
29+
30+
/*
31+
* The app element allows you to specify the portion of your app that should be hidden (via aria-hidden)
32+
to prevent assistive technologies such as screenreaders from reading content outside of the content of
33+
your modal. It can be specified in the following ways:
34+
* element
35+
Modal.setAppElement(appElement);
36+
* query selector - uses the first element found if you pass in a class.
37+
Modal.setAppElement('#your-app-element');
38+
*/
2839
setAppElement: (el) => {
2940
if (el) {
3041
appRoot = el;
3142
Modal.setAppElement(el);
3243
}
3344
},
45+
3446
getAppElement: () => appRoot
3547
};

0 commit comments

Comments
 (0)