@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.
@@ -958,7 +958,7 @@ class Selection {
958
958
  }
959
959
  }
960
960
  renderColumnCheckbox(args) {
961
- const rowChkBox = this.parent.createElement('input', { className: 'e-treecheckselect', attrs: { 'type': 'checkbox' } });
961
+ const rowChkBox = this.parent.createElement('input', { className: 'e-treecheckselect', attrs: { 'type': 'checkbox', 'aria-label': 'checkbox' } });
962
962
  const data = args.data;
963
963
  args.cell.classList.add('e-treegridcheckbox');
964
964
  args.cell.setAttribute('aria-label', 'checkbox');
@@ -1188,9 +1188,9 @@ class Selection {
1188
1188
  let checkedRecord;
1189
1189
  const recordIndex = this.parent.getCurrentViewRecords().indexOf(record[0]);
1190
1190
  const checkboxRecord = getParentData(this.parent, currentRecord.uniqueID);
1191
+ const tr = this.parent.getRows()[recordIndex];
1191
1192
  let checkbox;
1192
1193
  if (recordIndex > -1) {
1193
- const tr = this.parent.getRows()[recordIndex];
1194
1194
  let movableTr;
1195
1195
  if (this.parent.frozenRows || this.parent.getFrozenColumns()) {
1196
1196
  movableTr = this.parent.getMovableDataRows()[recordIndex];
@@ -1239,6 +1239,9 @@ class Selection {
1239
1239
  if (recordIndex > -1) {
1240
1240
  if (!isNullOrUndefined(checkbox)) {
1241
1241
  checkbox.classList.add(checkBoxclass);
1242
+ let chkstate = checkState == 'check' ? 'checked' : checkState == 'uncheck' ? 'unchecked' : 'mixed';
1243
+ tr.querySelector('.e-treecheckselect').setAttribute("aria-checked", checkState == 'check' ? 'true' : checkState == 'uncheck' ? 'false' : 'mixed');
1244
+ tr.querySelector('.e-frame').setAttribute("title", "checkbox" + chkstate);
1242
1245
  }
1243
1246
  }
1244
1247
  }
@@ -1565,6 +1568,7 @@ class Render {
1565
1568
  }
1566
1569
  if (iconRequired) {
1567
1570
  addClass([args.cell], 'e-treerowcell');
1571
+ args.cell.setAttribute("aria-expanded", data.expanded ? "true" : "false");
1568
1572
  const expandIcon = createElement('span', { className: 'e-icons' });
1569
1573
  let expand;
1570
1574
  if (this.parent.initialRender) {
@@ -3744,13 +3748,8 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
3744
3748
  this.trigger(getObject('name', args), args);
3745
3749
  }
3746
3750
  IsExpandCollapseClicked(args) {
3747
- if (args['name'] === 'rowSelecting' && !isNullOrUndefined(args.target) && (args.target.classList.contains('e-treegridexpand')
3748
- || args.target.classList.contains('e-treegridcollapse') || args.target.classList.contains('e-summarycell')) && (isNullOrUndefined(args['previousRowIndex']))) {
3749
- args.cancel = true;
3750
- return;
3751
- }
3752
- else if (args['name'] === 'rowDeselecting' && !isNullOrUndefined(args.target) && ((!isNullOrUndefined(args.row) && (!args.row.length)) && (args.target.classList.contains('e-treegridexpand')
3753
- || args.target.classList.contains('e-treegridcollapse') || args.target.classList.contains('e-summarycell')))) {
3751
+ if (!isNullOrUndefined(args.target) && (args.target.classList.contains('e-treegridexpand')
3752
+ || args.target.classList.contains('e-treegridcollapse') || args.target.classList.contains('e-summarycell'))) {
3754
3753
  args.cancel = true;
3755
3754
  return;
3756
3755
  }
@@ -5886,6 +5885,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
5886
5885
  }
5887
5886
  removeClass([targetEle], 'e-treegridexpand');
5888
5887
  }
5888
+ row.querySelectorAll('.e-treerowcell')[0].setAttribute("aria-expanded", action == 'expand' ? 'true' : 'false');
5889
5889
  const detailrows = gridRows.filter((r) => r.classList.contains('e-griddetailrowindex' + record.index + 'level' + (record.level + 1)));
5890
5890
  if (isRemoteData(this) && !isOffline(this)) {
5891
5891
  this.remoteExpand(action, row, record);