@syncfusion/ej2-filemanager 34.1.31 → 34.1.33

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.
@@ -4230,6 +4230,7 @@ function onFolderDialogOpen(parent) {
4230
4230
  createInput(ele, getLocaleText(parent, 'Content-NewFolder'));
4231
4231
  }
4232
4232
  ele.parentElement.nextElementSibling.innerHTML = '';
4233
+ ele.setAttribute('aria-invalid', 'false');
4233
4234
  ele.oninput = () => {
4234
4235
  onValidate(parent, ele);
4235
4236
  };
@@ -4254,6 +4255,7 @@ function onRenameDialogOpen(parent) {
4254
4255
  createInput(inputEle, getLocaleText(parent, 'Content-Rename'));
4255
4256
  }
4256
4257
  inputEle.parentElement.nextElementSibling.innerHTML = '';
4258
+ inputEle.setAttribute('aria-invalid', 'false');
4257
4259
  inputEle.oninput = () => {
4258
4260
  onValidate(parent, inputEle);
4259
4261
  };
@@ -4333,7 +4335,7 @@ function getOptions(parent, text, e, details) {
4333
4335
  case 'NewFolder':
4334
4336
  options.dialogName = 'Create Folder';
4335
4337
  options.header = getLocaleText(parent, 'Header-NewFolder');
4336
- options.content = '<input type="text" value="New folder" id="newname"><div class="e-fe-error"></div>';
4338
+ options.content = '<input type="text" value="New folder" id="newname" aria-invalid="false" aria-describedby="newname_error"><div id="newname_error" class="e-fe-error" role="alert"></div>';
4337
4339
  options.buttons = [
4338
4340
  {
4339
4341
  buttonModel: { isPrimary: true, content: getLocaleText(parent, 'Button-Create') },
@@ -4376,7 +4378,7 @@ function getOptions(parent, text, e, details) {
4376
4378
  case 'Rename':
4377
4379
  options.dialogName = 'Rename';
4378
4380
  options.header = getLocaleText(parent, 'Header-Rename');
4379
- options.content = '<input type="text" class="e-input" id="rename"><div class="e-fe-error"></div>';
4381
+ options.content = '<input type="text" class="e-input" id="rename" aria-invalid="false" aria-describedby="rename_error"><div id="rename_error" class="e-fe-error" role="alert"></div>';
4380
4382
  options.buttons = [
4381
4383
  {
4382
4384
  buttonModel: { isPrimary: true, content: getLocaleText(parent, 'Button-Save') },
@@ -4627,9 +4629,11 @@ function onValidate(parent, ele) {
4627
4629
  addInvalid(parent, ele);
4628
4630
  }
4629
4631
  else if (ele.value === '') {
4632
+ ele.setAttribute('aria-invalid', 'true');
4630
4633
  ele.parentElement.nextElementSibling.innerHTML = getLocaleText(parent, 'Validation-Empty');
4631
4634
  }
4632
4635
  else {
4636
+ ele.setAttribute('aria-invalid', 'false');
4633
4637
  ele.parentElement.nextElementSibling.innerHTML = '';
4634
4638
  }
4635
4639
  }
@@ -4657,6 +4661,7 @@ function onSubmitValidate(parent, ele) {
4657
4661
  */
4658
4662
  function addInvalid(parent, ele) {
4659
4663
  const error = getLocaleText(parent, 'Validation-Invalid').replace('{0}', '"' + ele.value + '"');
4664
+ ele.setAttribute('aria-invalid', 'true');
4660
4665
  if (parent.enableHtmlSanitizer) {
4661
4666
  ele.parentElement.nextElementSibling.textContent = error;
4662
4667
  }
@@ -6083,12 +6088,22 @@ class LargeIconsView {
6083
6088
  }
6084
6089
  }
6085
6090
  spaceKey(fItem) {
6086
- if (!isNullOrUndefined(fItem) && !fItem.classList.contains(ACTIVE)) {
6087
- const fileSelectionArgs = this.triggerSelection('select', fItem);
6088
- if (fileSelectionArgs.cancel !== true) {
6089
- this.addActive(fItem);
6090
- this.parent.notify(selectionChanged, {});
6091
- this.triggerSelect('select', fItem);
6091
+ if (!isNullOrUndefined(fItem)) {
6092
+ if (!fItem.classList.contains(ACTIVE)) {
6093
+ const fileSelectionArgs = this.triggerSelection('select', fItem);
6094
+ if (fileSelectionArgs.cancel !== true) {
6095
+ this.addActive(fItem);
6096
+ this.parent.notify(selectionChanged, {});
6097
+ this.triggerSelect('select', fItem);
6098
+ }
6099
+ }
6100
+ else {
6101
+ const fileSelectionArgs = this.triggerSelection('unselect', fItem);
6102
+ if (fileSelectionArgs.cancel !== true) {
6103
+ this.removeActive(fItem);
6104
+ this.parent.notify(selectionChanged, {});
6105
+ this.triggerSelect('unselect', fItem);
6106
+ }
6092
6107
  }
6093
6108
  }
6094
6109
  }
@@ -12610,11 +12625,15 @@ class DetailsView {
12610
12625
  case 'enter':
12611
12626
  if (this.gridObj.selectedRowIndex === -1 && this.gridObj.allowSorting === true) {
12612
12627
  if (!e.target.classList.contains('e-fe-grid-icon')) {
12613
- const direction = !e.target.getElementsByClassName('e-ascending').length ? 'Ascending' : 'Descending';
12614
- const currentField = this.gridObj.getColumnByUid(e.target.querySelector('.e-headercelldiv').getAttribute('e-mappinguid')).field;
12615
- this.gridObj.sortColumn(currentField, direction);
12616
- if (!isNullOrUndefined(this.getFocusedItem().nextSibling)) {
12617
- this.getFocusedItem().nextSibling.setAttribute('tabindex', '0');
12628
+ const headerDiv = e.target.querySelector('.e-headercelldiv');
12629
+ if (headerDiv) {
12630
+ const mappingUid = headerDiv.getAttribute('data-mappinguid');
12631
+ const direction = !e.target.getElementsByClassName('e-ascending').length ? 'Ascending' : 'Descending';
12632
+ const currentField = this.gridObj.getColumnByUid(mappingUid).field;
12633
+ this.gridObj.sortColumn(currentField, direction);
12634
+ if (!isNullOrUndefined(this.getFocusedItem().nextSibling)) {
12635
+ this.getFocusedItem().nextSibling.setAttribute('tabindex', '0');
12636
+ }
12618
12637
  }
12619
12638
  }
12620
12639
  break;
@@ -12846,6 +12865,14 @@ class DetailsView {
12846
12865
  this.gridObj.selectRows(selRowIndeces);
12847
12866
  this.addFocus(lItem);
12848
12867
  }
12868
+ else if (e.action === 'space' && this.isSelected(selRowIndeces, focIndex)) {
12869
+ const indexToRemove = selRowIndeces.indexOf(focIndex);
12870
+ if (indexToRemove > -1) {
12871
+ selRowIndeces.splice(indexToRemove, 1);
12872
+ this.gridObj.selectRows(selRowIndeces);
12873
+ this.addFocus(focIndex);
12874
+ }
12875
+ }
12849
12876
  else if (e.action === 'shiftSpace') {
12850
12877
  this.gridObj.selectRow(selIndex);
12851
12878
  }