@syncfusion/ej2-dropdowns 35.1.43 → 35.1.46

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.
@@ -3646,8 +3646,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
3646
3646
  'aria-disabled': 'false',
3647
3647
  'role': 'combobox',
3648
3648
  'aria-expanded': 'false',
3649
- 'aria-live': 'polite',
3650
- 'aria-labelledby': this.hiddenElement.id
3649
+ 'aria-live': 'polite'
3651
3650
  };
3652
3651
  };
3653
3652
  DropDownList.prototype.setEnableRtl = function () {
@@ -6969,6 +6968,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
6969
6968
  if (isNullOrUndefined(this.inputElement.getAttribute('type'))) {
6970
6969
  this.inputElement.setAttribute('type', 'text');
6971
6970
  }
6971
+ if (this.getModuleName() === 'dropdownlist') {
6972
+ this.inputElement.setAttribute('aria-label', this.getModuleName());
6973
+ }
6972
6974
  this.inputElement.setAttribute('aria-expanded', 'false');
6973
6975
  }
6974
6976
  else {
@@ -7055,7 +7057,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
7055
7057
  if (!this.targetElement().hasAttribute('aria-label')) {
7056
7058
  attributes(this.targetElement(), { 'aria-label': this.getModuleName() });
7057
7059
  }
7058
- if (!this.inputElement.hasAttribute('aria-labelledby')) {
7060
+ if (this.getModuleName() !== 'dropdownlist' && !this.inputElement.hasAttribute('aria-labelledby')) {
7059
7061
  this.inputElement.setAttribute('aria-labelledby', this.hiddenElement.id);
7060
7062
  }
7061
7063
  this.inputElement.setAttribute('aria-expanded', 'false');
@@ -7063,9 +7065,19 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
7063
7065
  attributes(this.targetElement(), this.getAriaAttributes());
7064
7066
  this.updateDataAttribute(this.htmlAttributes);
7065
7067
  this.setHTMLAttributes();
7066
- if (this.targetElement() === this.inputElement) {
7068
+ if (this.getModuleName() !== 'dropdownlist' && this.targetElement() === this.inputElement) {
7067
7069
  this.inputElement.removeAttribute('aria-labelledby');
7068
7070
  }
7071
+ if (this.getModuleName() === 'dropdownlist' && this.targetElement() === this.inputWrapper.container) {
7072
+ var floatLabel = this.inputWrapper.container.getElementsByClassName('e-float-text')[0];
7073
+ if (!isNullOrUndefined(this.element.id) && this.element.id !== '' && !isNullOrUndefined(floatLabel)) {
7074
+ floatLabel.id = 'label_' + this.element.id.replace(/ /g, '_');
7075
+ attributes(this.inputWrapper.container, { 'aria-labelledby': floatLabel.id });
7076
+ }
7077
+ else {
7078
+ this.inputWrapper.container.removeAttribute('aria-labelledby');
7079
+ }
7080
+ }
7069
7081
  if (this.value !== null || this.activeIndex !== null || this.text !== null) {
7070
7082
  if (this.enableVirtualization) {
7071
7083
  this.listItemHeight = this.getListHeight();
@@ -7124,7 +7136,12 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
7124
7136
  var floatLabelElement = this.inputWrapper.container.getElementsByClassName('e-float-text')[0];
7125
7137
  if (!isNullOrUndefined(this.element.id) && this.element.id !== '' && !isNullOrUndefined(floatLabelElement)) {
7126
7138
  floatLabelElement.id = 'label_' + this.element.id.replace(/ /g, '_');
7127
- attributes(this.inputElement, { 'aria-labelledby': floatLabelElement.id });
7139
+ attributes(this.getModuleName() === 'dropdownlist'
7140
+ ? this.inputWrapper.container
7141
+ : this.inputElement, { 'aria-labelledby': floatLabelElement.id });
7142
+ if (this.getModuleName() === 'dropdownlist' && this.inputElement) {
7143
+ this.inputElement.removeAttribute('aria-labelledby');
7144
+ }
7128
7145
  }
7129
7146
  this.renderComplete();
7130
7147
  this.listItemHeight = this.getListHeight();
@@ -7341,7 +7358,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
7341
7358
  if (label) {
7342
7359
  label.remove();
7343
7360
  }
7344
- this_1.inputElement.removeAttribute('aria-labelledby');
7361
+ this_1.inputWrapper.container.removeAttribute('aria-labelledby');
7345
7362
  }
7346
7363
  else if (this_1.floatLabelType !== 'Never' && !this_1.value) {
7347
7364
  var floatLabel = this_1.inputWrapper.container
@@ -7373,7 +7390,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
7373
7390
  }
7374
7391
  floatLabel.style.width = this_1.inputElement.offsetWidth + 'px';
7375
7392
  floatLabel.textContent = newProp.placeholder;
7376
- this_1.inputElement.setAttribute('aria-labelledby', floatLabel.id);
7393
+ this_1.inputWrapper.container.setAttribute('aria-labelledby', floatLabel.id);
7377
7394
  }
7378
7395
  }
7379
7396
  break;
@@ -7586,14 +7603,28 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
7586
7603
  this_1.updateSelectElementData(this_1.allowFiltering);
7587
7604
  }
7588
7605
  break;
7589
- case 'floatLabelType':
7606
+ case 'floatLabelType': {
7590
7607
  Input.removeFloating(this_1.inputWrapper);
7591
7608
  Input.addFloating(this_1.inputElement, newProp.floatLabelType, this_1.placeholder, this_1.createElement);
7592
7609
  if (!isNullOrUndefined(this_1.inputWrapper.buttons[0]) &&
7593
7610
  this_1.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0] && this_1.floatLabelType !== 'Never') {
7594
7611
  this_1.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');
7595
7612
  }
7613
+ if (this_1.getModuleName() === 'dropdownlist') {
7614
+ var floatLabelElement = this_1.inputWrapper.container.getElementsByClassName('e-float-text')[0];
7615
+ if (!isNullOrUndefined(this_1.element.id) &&
7616
+ this_1.element.id !== '' && !isNullOrUndefined(floatLabelElement)) {
7617
+ floatLabelElement.id = 'label_' + this_1.element.id.replace(/ /g, '_');
7618
+ attributes(this_1.inputWrapper.container, {
7619
+ 'aria-labelledby': floatLabelElement.id
7620
+ });
7621
+ }
7622
+ else {
7623
+ this_1.inputWrapper.container.removeAttribute('aria-labelledby');
7624
+ }
7625
+ }
7596
7626
  break;
7627
+ }
7597
7628
  case 'showClearButton':
7598
7629
  if (!this_1.inputWrapper.clearButton) {
7599
7630
  Input.setClearButton(newProp.showClearButton, this_1.inputElement, this_1.inputWrapper, null, this_1.createElement);
@@ -7702,7 +7733,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
7702
7733
  }
7703
7734
  if (label && this.getModuleName() === 'dropdownlist' && (!this.placeholder || this.placeholder.trim() === '')) {
7704
7735
  label.remove();
7705
- this.inputElement.removeAttribute('aria-labelledby');
7736
+ this.inputWrapper.container.removeAttribute('aria-labelledby');
7706
7737
  }
7707
7738
  };
7708
7739
  /**