@brightspace-ui/core 3.333.3 → 3.333.5

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.
@@ -165,8 +165,8 @@ class Menu extends PropertyRequiredMixin(ThemeMixin(HierarchicalViewMixin(LitEle
165
165
 
166
166
  resetFocusables(isActiveView) {
167
167
  const focusable = this._getTabFocusable();
168
- if (isActiveView && focusable.getRootNode().activeElement === focusable) return;
169
- this._getTabFocusable()?.setAttribute('tabindex', '-1');
168
+ if (!focusable || (isActiveView && focusable.getRootNode().activeElement === focusable)) return;
169
+ focusable?.setAttribute('tabindex', '-1');
170
170
  }
171
171
 
172
172
  _createReturnItem() {
package/helpers/dom.js CHANGED
@@ -1,5 +1,3 @@
1
- import { getFlag } from './flags.js';
2
-
3
1
  export function elemIdListAdd(elem, attrName, value) {
4
2
 
5
3
  if (elem === undefined || elem === null || !elem.getAttribute || !elem.setAttribute) {
@@ -156,13 +154,10 @@ function getComposedElementSibling(node, { direction = 'next', predicate } = {})
156
154
 
157
155
  export function getComposedNextAncestorElementSibling(node, { predicate } = {}) {
158
156
 
159
- const focusableFixFlag = getFlag('GAUD-10260-get-focusable-fix', true);
160
-
161
157
  let parentNode = getComposedParent(node);
162
158
 
163
159
  while (parentNode) {
164
- // Clean-up this next line when cleaning up GAUD-10260-get-focusable-fix
165
- const nextParentSibling = focusableFixFlag ? getComposedNextElementSibling(parentNode, { predicate }) : parentNode.nextElementSibling;
160
+ const nextParentSibling = getComposedNextElementSibling(parentNode, { predicate });
166
161
  if (nextParentSibling) return nextParentSibling;
167
162
  parentNode = getComposedParent(parentNode);
168
163
  }
@@ -199,13 +194,10 @@ export function getComposedParent(node) {
199
194
 
200
195
  export function getComposedPreviousAncestorElementSibling(node, { predicate } = {}) {
201
196
 
202
- const focusableFixFlag = getFlag('GAUD-10260-get-focusable-fix', true);
203
-
204
197
  let parentNode = getComposedParent(node);
205
198
 
206
199
  while (parentNode) {
207
- // Clean-up this next line when cleaning up GAUD-10260-get-focusable-fix
208
- const previousParentSibling = focusableFixFlag ? getComposedPreviousElementSibling(parentNode, { predicate }) : parentNode.previousElementSibling;
200
+ const previousParentSibling = getComposedPreviousElementSibling(parentNode, { predicate });
209
201
  if (previousParentSibling) return previousParentSibling;
210
202
  parentNode = getComposedParent(parentNode);
211
203
  }
package/helpers/focus.js CHANGED
@@ -9,7 +9,6 @@ import {
9
9
  getFirstVisibleAncestor,
10
10
  isVisible
11
11
  } from './dom.js';
12
- import { getFlag } from './flags.js';
13
12
 
14
13
  const focusableElements = {
15
14
  a: true,
@@ -134,8 +133,6 @@ export function getLastFocusableDescendant(node, includeHidden) {
134
133
 
135
134
  export function getPreviousFocusable(node, includeHidden) {
136
135
 
137
- const focusableFixFlag = getFlag('GAUD-10260-get-focusable-fix', true);
138
-
139
136
  if (!node) return null;
140
137
 
141
138
  if (includeHidden === undefined) includeHidden = false;
@@ -148,8 +145,7 @@ export function getPreviousFocusable(node, includeHidden) {
148
145
  if (focusable) return focusable;
149
146
  }
150
147
 
151
- // Clean-up this next line when cleaning up GAUD-10260-get-focusable-fix
152
- const previousSibling = focusableFixFlag ? getComposedPreviousElementSibling(node) : node.previousElementSibling;
148
+ const previousSibling = getComposedPreviousElementSibling(node);
153
149
  if (previousSibling) {
154
150
  const siblingFocusable = _getPreviousFocusable(previousSibling, false, false);
155
151
  if (siblingFocusable) return siblingFocusable;
@@ -171,8 +167,6 @@ export function getPreviousFocusable(node, includeHidden) {
171
167
 
172
168
  export function getNextFocusable(node, includeHidden, ignore, ignoreChildren) {
173
169
 
174
- const focusableFixFlag = getFlag('GAUD-10260-get-focusable-fix', true);
175
-
176
170
  if (!node) return null;
177
171
 
178
172
  if (includeHidden === undefined) includeHidden = false;
@@ -187,8 +181,7 @@ export function getNextFocusable(node, includeHidden, ignore, ignoreChildren) {
187
181
  if (focusable) return focusable;
188
182
  }
189
183
 
190
- // Clean-up this next line when cleaning up GAUD-10260-get-focusable-fix
191
- const nextSibling = focusableFixFlag ? getComposedNextElementSibling(node) : node.nextElementSibling;
184
+ const nextSibling = getComposedNextElementSibling(node);
192
185
  if (nextSibling) {
193
186
  const siblingFocusable = _getNextFocusable(nextSibling, false, false);
194
187
  if (siblingFocusable) return siblingFocusable;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.333.3",
3
+ "version": "3.333.5",
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",