@descope/flow-components 3.1.12 → 3.1.13

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.
@@ -5,7 +5,7 @@
5
5
  "name": "flowComponents",
6
6
  "type": "app",
7
7
  "buildInfo": {
8
- "buildVersion": "3.1.12",
8
+ "buildVersion": "3.1.13",
9
9
  "buildName": "@descope/flow-components"
10
10
  },
11
11
  "remoteEntry": {
@@ -5,7 +5,7 @@
5
5
  "name": "flowComponents",
6
6
  "type": "app",
7
7
  "buildInfo": {
8
- "buildVersion": "3.1.12",
8
+ "buildVersion": "3.1.13",
9
9
  "buildName": "@descope/flow-components"
10
10
  },
11
11
  "remoteEntry": {
package/dist/index.cjs.js CHANGED
@@ -88214,7 +88214,7 @@ function requireIndex_cjs () {
88214
88214
  this.tooltip.style.overflow = 'hidden';
88215
88215
  this.tooltip.style.position = 'absolute';
88216
88216
  }
88217
-
88217
+
88218
88218
  #revealWrappedParts() {
88219
88219
  this.tooltip.style.width = '100%';
88220
88220
  this.tooltip.style.height = '100%';
@@ -88239,9 +88239,7 @@ function requireIndex_cjs () {
88239
88239
  #setTooltipTarget() {
88240
88240
  if (!this.children?.length) return;
88241
88241
 
88242
- let ele = Array.from(this.children).find(
88243
- (child) => child !== this.tooltip,
88244
- );
88242
+ let ele = Array.from(this.children).find((child) => child !== this.tooltip);
88245
88243
 
88246
88244
  if (!ele) return;
88247
88245
 
@@ -88261,6 +88259,10 @@ function requireIndex_cjs () {
88261
88259
  return enrichedText;
88262
88260
  }
88263
88261
 
88262
+ get srLabel() {
88263
+ return this.tooltip?.querySelector('[slot="sr-label"]');
88264
+ }
88265
+
88264
88266
  #initTooltipTextComponent() {
88265
88267
  if (!this.overlayContentNode) return;
88266
88268
 
@@ -88271,6 +88273,12 @@ function requireIndex_cjs () {
88271
88273
 
88272
88274
  this.overlayContentNode.appendChild(this.textComponent);
88273
88275
 
88276
+ // An empty sr-label with role="tooltip" fails accessibility checks.
88277
+ // Hide it when there's no tooltip text; vaadin handles populating it when text is present.
88278
+ if (this.srLabel && !this.tooltipText) {
88279
+ this.srLabel.setAttribute('aria-hidden', 'true');
88280
+ }
88281
+
88274
88282
  forwardAttrs(this, this.textComponent, {
88275
88283
  includeAttrs: ['readonly'],
88276
88284
  });
@@ -88306,7 +88314,15 @@ function requireIndex_cjs () {
88306
88314
 
88307
88315
  #updateText(value) {
88308
88316
  if (!this.textComponent) return;
88309
- this.textComponent.textContent = value?.trim();
88317
+ const trimmedValue = (value ?? '').trim();
88318
+ this.textComponent.textContent = trimmedValue;
88319
+ if (this.srLabel) {
88320
+ if (trimmedValue) {
88321
+ this.srLabel.removeAttribute('aria-hidden');
88322
+ } else {
88323
+ this.srLabel.setAttribute('aria-hidden', 'true');
88324
+ }
88325
+ }
88310
88326
  }
88311
88327
 
88312
88328
  attributeChangedCallback(attrName, oldValue, newValue) {
@@ -88318,7 +88334,7 @@ function requireIndex_cjs () {
88318
88334
  }
88319
88335
 
88320
88336
  if (attrName === 'opened') {
88321
- this.#handleTooltipVisibility(attrName, newValue);
88337
+ this.#handleTooltipVisibility();
88322
88338
  }
88323
88339
  }
88324
88340
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descope/flow-components",
3
- "version": "3.1.12",
3
+ "version": "3.1.13",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -97,7 +97,7 @@
97
97
  "webpack-subresource-integrity": "5.2.0-rc.1"
98
98
  },
99
99
  "dependencies": {
100
- "@descope/web-components-ui": "3.1.12"
100
+ "@descope/web-components-ui": "3.1.13"
101
101
  },
102
102
  "peerDependencies": {
103
103
  "react": ">= 18"