@syncfusion/ej2-treegrid 20.3.57 → 20.3.58

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.
@@ -1033,7 +1033,7 @@ var Selection = /** @__PURE__ @class */ (function () {
1033
1033
  }
1034
1034
  };
1035
1035
  Selection.prototype.renderColumnCheckbox = function (args) {
1036
- var rowChkBox = this.parent.createElement('input', { className: 'e-treecheckselect', attrs: { 'type': 'checkbox' } });
1036
+ var rowChkBox = this.parent.createElement('input', { className: 'e-treecheckselect', attrs: { 'type': 'checkbox', 'aria-label': 'checkbox' } });
1037
1037
  var data = args.data;
1038
1038
  args.cell.classList.add('e-treegridcheckbox');
1039
1039
  args.cell.setAttribute('aria-label', 'checkbox');
@@ -1265,9 +1265,9 @@ var Selection = /** @__PURE__ @class */ (function () {
1265
1265
  var checkedRecord;
1266
1266
  var recordIndex = this.parent.getCurrentViewRecords().indexOf(record[0]);
1267
1267
  var checkboxRecord = getParentData(this.parent, currentRecord.uniqueID);
1268
+ var tr = this.parent.getRows()[recordIndex];
1268
1269
  var checkbox;
1269
1270
  if (recordIndex > -1) {
1270
- var tr = this.parent.getRows()[recordIndex];
1271
1271
  var movableTr = void 0;
1272
1272
  if (this.parent.frozenRows || this.parent.getFrozenColumns()) {
1273
1273
  movableTr = this.parent.getMovableDataRows()[recordIndex];
@@ -1316,6 +1316,9 @@ var Selection = /** @__PURE__ @class */ (function () {
1316
1316
  if (recordIndex > -1) {
1317
1317
  if (!isNullOrUndefined(checkbox)) {
1318
1318
  checkbox.classList.add(checkBoxclass);
1319
+ var chkstate = checkState == 'check' ? 'checked' : checkState == 'uncheck' ? 'unchecked' : 'mixed';
1320
+ tr.querySelector('.e-treecheckselect').setAttribute("aria-checked", checkState == 'check' ? 'true' : checkState == 'uncheck' ? 'false' : 'mixed');
1321
+ tr.querySelector('.e-frame').setAttribute("title", "checkbox" + chkstate);
1319
1322
  }
1320
1323
  }
1321
1324
  };
@@ -1681,6 +1684,7 @@ var Render = /** @__PURE__ @class */ (function () {
1681
1684
  }
1682
1685
  if (iconRequired) {
1683
1686
  addClass([args.cell], 'e-treerowcell');
1687
+ args.cell.setAttribute("aria-expanded", data.expanded ? "true" : "false");
1684
1688
  var expandIcon = createElement('span', { className: 'e-icons' });
1685
1689
  var expand = void 0;
1686
1690
  if (this.parent.initialRender) {
@@ -3991,13 +3995,8 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
3991
3995
  this.trigger(getObject('name', args), args);
3992
3996
  };
3993
3997
  TreeGrid.prototype.IsExpandCollapseClicked = function (args) {
3994
- if (args['name'] === 'rowSelecting' && !isNullOrUndefined(args.target) && (args.target.classList.contains('e-treegridexpand')
3995
- || args.target.classList.contains('e-treegridcollapse') || args.target.classList.contains('e-summarycell')) && (isNullOrUndefined(args['previousRowIndex']))) {
3996
- args.cancel = true;
3997
- return;
3998
- }
3999
- else if (args['name'] === 'rowDeselecting' && !isNullOrUndefined(args.target) && ((!isNullOrUndefined(args.row) && (!args.row.length)) && (args.target.classList.contains('e-treegridexpand')
4000
- || args.target.classList.contains('e-treegridcollapse') || args.target.classList.contains('e-summarycell')))) {
3998
+ if (!isNullOrUndefined(args.target) && (args.target.classList.contains('e-treegridexpand')
3999
+ || args.target.classList.contains('e-treegridcollapse') || args.target.classList.contains('e-summarycell'))) {
4001
4000
  args.cancel = true;
4002
4001
  return;
4003
4002
  }
@@ -6154,6 +6153,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6154
6153
  }
6155
6154
  removeClass([targetEle], 'e-treegridexpand');
6156
6155
  }
6156
+ row.querySelectorAll('.e-treerowcell')[0].setAttribute("aria-expanded", action == 'expand' ? 'true' : 'false');
6157
6157
  var detailrows = gridRows.filter(function (r) {
6158
6158
  return r.classList.contains('e-griddetailrowindex' + record.index + 'level' + (record.level + 1));
6159
6159
  });