@brightspace-ui/core 2.34.0 → 2.34.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.
|
@@ -3,6 +3,8 @@ import { css, html, LitElement } from 'lit';
|
|
|
3
3
|
import { cssEscape, getComposedChildren, getComposedParent, isVisible } from '../../helpers/dom.js';
|
|
4
4
|
import { getUniqueId } from '../../helpers/uniqueId.js';
|
|
5
5
|
|
|
6
|
+
export const BACKDROP_ROLE = 'd2l-backdrop-role';
|
|
7
|
+
|
|
6
8
|
const reduceMotion = matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
7
9
|
|
|
8
10
|
const scrollKeys = [];
|
|
@@ -159,7 +161,7 @@ function hideAccessible(target) {
|
|
|
159
161
|
if (child.hasAttribute('d2l-backdrop-hidden')) continue;
|
|
160
162
|
|
|
161
163
|
const role = child.getAttribute('role');
|
|
162
|
-
if (role) child.setAttribute(
|
|
164
|
+
if (role) child.setAttribute(BACKDROP_ROLE, role);
|
|
163
165
|
child.setAttribute('role', 'presentation');
|
|
164
166
|
|
|
165
167
|
if (child.nodeName === 'FORM' || child.nodeName === 'A') {
|
|
@@ -200,10 +202,10 @@ export function preventBodyScroll() {
|
|
|
200
202
|
function showAccessible(elems) {
|
|
201
203
|
for (let i = 0; i < elems.length; i++) {
|
|
202
204
|
const elem = elems[i];
|
|
203
|
-
const role = elem.getAttribute(
|
|
205
|
+
const role = elem.getAttribute(BACKDROP_ROLE);
|
|
204
206
|
if (role) {
|
|
205
207
|
elem.setAttribute('role', role);
|
|
206
|
-
elem.removeAttribute(
|
|
208
|
+
elem.removeAttribute(BACKDROP_ROLE);
|
|
207
209
|
} else {
|
|
208
210
|
elem.removeAttribute('role');
|
|
209
211
|
}
|
|
@@ -2,6 +2,7 @@ import '../button/button-subtle.js';
|
|
|
2
2
|
import { css, html, LitElement } from 'lit';
|
|
3
3
|
import { announce } from '../../helpers/announce.js';
|
|
4
4
|
import { ArrowKeysMixin } from '../../mixins/arrow-keys-mixin.js';
|
|
5
|
+
import { BACKDROP_ROLE } from '../backdrop/backdrop.js';
|
|
5
6
|
import { classMap } from 'lit/directives/class-map.js';
|
|
6
7
|
import { getOffsetParent } from '../../helpers/dom.js';
|
|
7
8
|
import { InteractiveMixin } from '../../mixins/interactive-mixin.js';
|
|
@@ -312,7 +313,8 @@ class TagList extends LocalizeCoreElement(InteractiveMixin(ArrowKeysMixin(LitEle
|
|
|
312
313
|
await node.updateComplete;
|
|
313
314
|
|
|
314
315
|
const role = node.getAttribute('role');
|
|
315
|
-
|
|
316
|
+
const backdropRole = node.getAttribute(BACKDROP_ROLE);
|
|
317
|
+
if (role !== 'listitem' && backdropRole !== 'listitem') return false;
|
|
316
318
|
|
|
317
319
|
if (this.clearable) node.setAttribute('clearable', 'clearable');
|
|
318
320
|
node.removeAttribute('data-is-chomped');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspace-ui/core",
|
|
3
|
-
"version": "2.34.
|
|
3
|
+
"version": "2.34.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",
|