@momentum-design/components 0.33.1 → 0.33.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.
@@ -67,6 +67,10 @@ declare class Icon extends Component {
67
67
  * Aria-label attribute to be set for accessibility
68
68
  */
69
69
  ariaLabel: string | null;
70
+ /**
71
+ * Aria-labelledby attribute to be set for accessibility
72
+ */
73
+ ariaLabelledBy: string | null;
70
74
  private readonly iconProviderContext;
71
75
  private abortController;
72
76
  constructor();
@@ -72,6 +72,10 @@ class Icon extends Component {
72
72
  * Aria-label attribute to be set for accessibility
73
73
  */
74
74
  this.ariaLabel = null;
75
+ /**
76
+ * Aria-labelledby attribute to be set for accessibility
77
+ */
78
+ this.ariaLabelledBy = null;
75
79
  this.iconProviderContext = providerUtils.consume({ host: this, context: IconProvider.Context });
76
80
  this.abortController = new AbortController(); // Initialize AbortController
77
81
  }
@@ -198,8 +202,8 @@ class Icon extends Component {
198
202
  }
199
203
  });
200
204
  }
201
- if (changedProperties.has('ariaLabel')) {
202
- this.role = this.ariaLabel ? 'img' : null;
205
+ if (changedProperties.has('ariaLabel') || changedProperties.has('ariaLabelledBy')) {
206
+ this.role = (this.ariaLabel || this.ariaLabelledBy) ? 'img' : null;
203
207
  }
204
208
  if (changedProperties.has('size') || changedProperties.has('lengthUnit')) {
205
209
  this.updateSize();
@@ -246,6 +250,10 @@ __decorate([
246
250
  property({ type: String, attribute: 'aria-label' }),
247
251
  __metadata("design:type", Object)
248
252
  ], Icon.prototype, "ariaLabel", void 0);
253
+ __decorate([
254
+ property({ type: String, attribute: 'aria-labelledby' }),
255
+ __metadata("design:type", Object)
256
+ ], Icon.prototype, "ariaLabelledBy", void 0);
249
257
  __decorate([
250
258
  state(),
251
259
  __metadata("design:type", AbortController)
@@ -181,7 +181,6 @@ declare class Popover extends Popover_base {
181
181
  */
182
182
  disableAriaExpanded: boolean;
183
183
  arrowElement: HTMLElement | null;
184
- /** @internal */
185
184
  triggerElement: HTMLElement | null;
186
185
  /** @internal */
187
186
  private hoverTimer;
@@ -199,7 +199,6 @@ class Popover extends FocusTrapMixin(Component) {
199
199
  */
200
200
  this.disableAriaExpanded = DEFAULTS.DISABLE_ARIA_EXPANDED;
201
201
  this.arrowElement = null;
202
- /** @internal */
203
202
  this.triggerElement = null;
204
203
  /** @internal */
205
204
  this.hoverTimer = null;
@@ -3676,6 +3676,16 @@
3676
3676
  "description": "Aria-label attribute to be set for accessibility",
3677
3677
  "attribute": "aria-label"
3678
3678
  },
3679
+ {
3680
+ "kind": "field",
3681
+ "name": "ariaLabelledBy",
3682
+ "type": {
3683
+ "text": "string | null"
3684
+ },
3685
+ "default": "null",
3686
+ "description": "Aria-labelledby attribute to be set for accessibility",
3687
+ "attribute": "aria-labelledby"
3688
+ },
3679
3689
  {
3680
3690
  "kind": "field",
3681
3691
  "name": "iconProviderContext",
@@ -3792,6 +3802,15 @@
3792
3802
  "default": "null",
3793
3803
  "description": "Aria-label attribute to be set for accessibility",
3794
3804
  "fieldName": "ariaLabel"
3805
+ },
3806
+ {
3807
+ "name": "aria-labelledby",
3808
+ "type": {
3809
+ "text": "string | null"
3810
+ },
3811
+ "default": "null",
3812
+ "description": "Aria-labelledby attribute to be set for accessibility",
3813
+ "fieldName": "ariaLabelledBy"
3795
3814
  }
3796
3815
  ],
3797
3816
  "superclass": {
@@ -6186,6 +6205,15 @@
6186
6205
  "privacy": "public",
6187
6206
  "default": "null"
6188
6207
  },
6208
+ {
6209
+ "kind": "field",
6210
+ "name": "triggerElement",
6211
+ "type": {
6212
+ "text": "HTMLElement | null"
6213
+ },
6214
+ "privacy": "public",
6215
+ "default": "null"
6216
+ },
6189
6217
  {
6190
6218
  "kind": "method",
6191
6219
  "name": "setupTriggerListener",
package/package.json CHANGED
@@ -38,5 +38,5 @@
38
38
  "lit": "^3.2.0",
39
39
  "uuid": "^11.0.5"
40
40
  },
41
- "version": "0.33.1"
41
+ "version": "0.33.3"
42
42
  }