@syncfusion/ej2-navigations 28.1.41 → 28.2.4

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.
@@ -10325,7 +10325,9 @@ let TreeView = TreeView_1 = class TreeView extends Component {
10325
10325
  }
10326
10326
  initialize() {
10327
10327
  this.element.setAttribute('role', 'tree');
10328
- this.element.setAttribute('aria-activedescendant', this.element.id + '_active');
10328
+ if (!isNullOrUndefined(this.fields.dataSource) && Array.isArray(this.fields.dataSource) && this.fields.dataSource.length !== 0) {
10329
+ this.element.setAttribute('aria-activedescendant', this.element.id + '_active');
10330
+ }
10329
10331
  this.setCssClass(null, this.cssClass);
10330
10332
  this.setEnableRtl();
10331
10333
  this.setFullRow(this.fullRowSelect);
@@ -11487,11 +11489,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
11487
11489
  if (!isNullOrUndefined(firstUl)) {
11488
11490
  firstUl.setAttribute('role', treeAriaAttr.treeRole);
11489
11491
  this.setMultiSelect(this.allowMultiSelection);
11490
- const firstNode = select('.' + LISTITEM, this.element);
11491
- if (firstNode) {
11492
- firstNode.setAttribute('tabindex', '0');
11493
- this.updateIdAttr(null, firstNode);
11494
- }
11492
+ this.setNodeFocusable();
11495
11493
  if (this.allowTextWrap) {
11496
11494
  this.updateWrap();
11497
11495
  }
@@ -15145,6 +15143,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
15145
15143
  }
15146
15144
  this.groupedData = this.getGroupedData(this.treeData, this.fields.parentID);
15147
15145
  }
15146
+ this.setNodeFocusable();
15148
15147
  this.updateCheckedStateFromDS();
15149
15148
  if (this.showCheckBox && dropLi) {
15150
15149
  this.ensureParentCheckState(dropLi);
@@ -15541,6 +15540,13 @@ let TreeView = TreeView_1 = class TreeView extends Component {
15541
15540
  this.doCheckBoxAction(nodes, false);
15542
15541
  }
15543
15542
  }
15543
+ setNodeFocusable() {
15544
+ const firstNode = select('.' + LISTITEM, this.element);
15545
+ if (firstNode) {
15546
+ firstNode.setAttribute('tabindex', '0');
15547
+ this.updateIdAttr(null, firstNode);
15548
+ }
15549
+ }
15544
15550
  };
15545
15551
  __decorate$8([
15546
15552
  Property(false)