@brightspace-ui/core 3.331.1 → 3.331.3

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.
@@ -104,7 +104,7 @@ export const DialogMixin = superclass => class extends superclass {
104
104
  window.removeEventListener('d2l-mvc-dialog-open', this.#handleMvcDialogOpen);
105
105
 
106
106
  // If the dialog is disconnected before the close animation finishes
107
- if (this.opened) {
107
+ if (!this.#closeHandled) {
108
108
  this._handleClose();
109
109
  }
110
110
  }
@@ -168,6 +168,7 @@ export const DialogMixin = superclass => class extends superclass {
168
168
 
169
169
  #useNativeInitialized = false;
170
170
  #ifrauDialogService = null;
171
+ #closeHandled = true;
171
172
 
172
173
  #handleMvcDialogOpen = () => {
173
174
  // native dialogs on top layer will be stacked on non-native dialogs regardless of z-index
@@ -391,6 +392,7 @@ export const DialogMixin = superclass => class extends superclass {
391
392
  detail: { action: this._action }
392
393
  }
393
394
  ));
395
+ this.#closeHandled = true;
394
396
  }
395
397
 
396
398
  _handleDialogCloseWithinNative(e) {
@@ -449,6 +451,7 @@ export const DialogMixin = superclass => class extends superclass {
449
451
 
450
452
  async _open() {
451
453
  if (!this.opened) return;
454
+ this.#closeHandled = false;
452
455
 
453
456
  this._opener = getComposedActiveElement();
454
457
  this._dismissibleId = setDismissible(() => {
@@ -90,19 +90,18 @@ class ToolbarDropdown extends FocusMixin(DropdownOpenerMixin(SlottedIconMixin(To
90
90
  return html`
91
91
  <button
92
92
  aria-disabled="${this.disabled ? 'true' : 'false'}"
93
- aria-label="${this.text}"
94
93
  id="opener"
95
94
  @keydown="${this.#handleKeyDown}"
96
95
  tabindex="${this._activeFocusable ? 0 : -1}"
97
96
  type="button">
98
97
  <div class="background"></div>
99
98
  ${this._renderIcon()}
100
- ${this.valueText ? html`<div class="value-text">${this.valueText}</div>` : nothing}
99
+ ${this.valueText ? html`<div aria-hidden="true" class="value-text">${this.valueText}</div>` : nothing}
101
100
  <d2l-icon icon="tier1:chevron-down-small"></d2l-icon>
102
101
  </button>
103
- <d2l-tooltip class="${classMap(tooltipClasses)}" for="opener">
104
- <span aria-hidden="true">${this.text}</span>
105
- <span class="d2l-offscreen">${this.valueText}</span>
102
+ <d2l-tooltip class="${classMap(tooltipClasses)}" for="opener" for-type="label">
103
+ <span>${this.text}</span>
104
+ <d2l-offscreen>${this.valueText}</d2l-offscreen>
106
105
  </d2l-tooltip>
107
106
  <slot></slot>
108
107
  `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.331.1",
3
+ "version": "3.331.3",
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",