@brightspace-ui/core 3.225.0 → 3.225.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,10 +2,12 @@ import '../colors/colors.js';
|
|
|
2
2
|
import { css, html, LitElement } from 'lit';
|
|
3
3
|
import { cssEscape, getComposedChildren, getComposedParent, isComposedAncestor, isVisible } from '../../helpers/dom.js';
|
|
4
4
|
import { getComposedActiveElement } from '../../helpers/focus.js';
|
|
5
|
+
import { getFlag } from '../../helpers/flags.js';
|
|
5
6
|
|
|
6
7
|
const BACKDROP_HIDDEN = 'data-d2l-backdrop-hidden';
|
|
7
8
|
const BACKDROP_ARIA_HIDDEN = 'data-d2l-backdrop-aria-hidden';
|
|
8
9
|
const BACKDROP_TABINDEX = 'data-d2l-backdrop-tabindex';
|
|
10
|
+
const BACKDROP_INERT = 'data-d2l-backdrop-inert';
|
|
9
11
|
const TRANSITION_DURATION = 200;
|
|
10
12
|
|
|
11
13
|
const reduceMotion = matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
@@ -180,6 +182,13 @@ function hideAccessible(target) {
|
|
|
180
182
|
}
|
|
181
183
|
child.setAttribute('tabindex', '-1');
|
|
182
184
|
|
|
185
|
+
if (getFlag('GAUD-9398-make-backdrop-inert', false)) {
|
|
186
|
+
if (child.hasAttribute('inert')) {
|
|
187
|
+
child.setAttribute(BACKDROP_INERT, '');
|
|
188
|
+
}
|
|
189
|
+
child.setAttribute('inert', '');
|
|
190
|
+
}
|
|
191
|
+
|
|
183
192
|
child.setAttribute(BACKDROP_HIDDEN, BACKDROP_HIDDEN);
|
|
184
193
|
hiddenElements.push(child);
|
|
185
194
|
}
|
|
@@ -213,6 +222,13 @@ function showAccessible(elems) {
|
|
|
213
222
|
} else {
|
|
214
223
|
elem.removeAttribute('tabindex');
|
|
215
224
|
}
|
|
225
|
+
if (getFlag('GAUD-9398-make-backdrop-inert', false)) {
|
|
226
|
+
if (elem.hasAttribute(BACKDROP_INERT)) {
|
|
227
|
+
elem.removeAttribute(BACKDROP_INERT);
|
|
228
|
+
} else {
|
|
229
|
+
elem.removeAttribute('inert');
|
|
230
|
+
}
|
|
231
|
+
}
|
|
216
232
|
elem.removeAttribute(BACKDROP_HIDDEN);
|
|
217
233
|
}
|
|
218
234
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspace-ui/core",
|
|
3
|
-
"version": "3.225.
|
|
3
|
+
"version": "3.225.1",
|
|
4
4
|
"description": "A collection of accessible, free, open-source web components for building Brightspace applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": "https://github.com/BrightspaceUI/core.git",
|