handsontable 14.0.0-next-23212d5-20231127 → 14.0.0-next-477622d-20231128

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.
@@ -249,8 +249,8 @@ class Overlay {
249
249
  rootDocument,
250
250
  rootWindow
251
251
  } = this.domBindings;
252
- const clone = rootDocument.createElement('DIV');
253
- const clonedTable = rootDocument.createElement('TABLE');
252
+ const clone = rootDocument.createElement('div');
253
+ const clonedTable = rootDocument.createElement('table');
254
254
  const tableParent = wtTable.wtRootElement.parentNode;
255
255
  clone.className = `${_constants.CLONE_CLASS_NAMES.get(this.type)} handsontable`;
256
256
  clone.setAttribute('dir', this.isRtl() ? 'rtl' : 'ltr');
@@ -245,8 +245,8 @@ export class Overlay {
245
245
  rootDocument,
246
246
  rootWindow
247
247
  } = this.domBindings;
248
- const clone = rootDocument.createElement('DIV');
249
- const clonedTable = rootDocument.createElement('TABLE');
248
+ const clone = rootDocument.createElement('div');
249
+ const clonedTable = rootDocument.createElement('table');
250
250
  const tableParent = wtTable.wtRootElement.parentNode;
251
251
  clone.className = `${CLONE_CLASS_NAMES.get(this.type)} handsontable`;
252
252
  clone.setAttribute('dir', this.isRtl() ? 'rtl' : 'ltr');
@@ -71,7 +71,7 @@ class ColumnHeadersRenderer extends _base.default {
71
71
  columnHeadersCount
72
72
  } = this.table;
73
73
  if (this.table.isAriaEnabled()) {
74
- (0, _element.setAttribute)(this.rootNode, [(0, _a11y.A11Y_PRESENTATION)()]);
74
+ (0, _element.setAttribute)(this.rootNode, [(0, _a11y.A11Y_ROWGROUP)()]);
75
75
  }
76
76
  for (let rowHeaderIndex = 0; rowHeaderIndex < columnHeadersCount; rowHeaderIndex += 1) {
77
77
  const {
@@ -93,7 +93,10 @@ class ColumnHeadersRenderer extends _base.default {
93
93
  // Remove all accessibility-related attributes for the header to start fresh.
94
94
  (0, _element.removeAttribute)(TH, [new RegExp('aria-(.*)'), new RegExp('role')]);
95
95
  if (this.table.isAriaEnabled()) {
96
- (0, _element.setAttribute)(TH, [(0, _a11y.A11Y_COLINDEX)(renderedColumnIndex + 1 + this.table.rowHeadersCount), (0, _a11y.A11Y_TABINDEX)(-1), (0, _a11y.A11Y_COLUMNHEADER)(), ...(renderedColumnIndex >= 0 ? [(0, _a11y.A11Y_SCOPE_COL)()] : [])]);
96
+ (0, _element.setAttribute)(TH, [(0, _a11y.A11Y_COLINDEX)(renderedColumnIndex + 1 + this.table.rowHeadersCount), (0, _a11y.A11Y_TABINDEX)(-1), (0, _a11y.A11Y_COLUMNHEADER)(), ...(renderedColumnIndex >= 0 ? [(0, _a11y.A11Y_SCOPE_COL)()] : [
97
+ // Adding `role=row` to the corner headers to prevent
98
+ // https://github.com/handsontable/dev-handsontable/issues/1574
99
+ (0, _a11y.A11Y_ROW)()])]);
97
100
  }
98
101
  columnHeaderFunctions[rowHeaderIndex](sourceColumnIndex, TH, rowHeaderIndex);
99
102
  }
@@ -1,6 +1,6 @@
1
1
  import { empty, setAttribute, removeAttribute } from "./../../../../helpers/dom/element.mjs";
2
2
  import BaseRenderer from "./_base.mjs";
3
- import { A11Y_COLINDEX, A11Y_COLUMNHEADER, A11Y_PRESENTATION, A11Y_ROW, A11Y_ROWINDEX, A11Y_SCOPE_COL, A11Y_TABINDEX } from "../../../../helpers/a11y.mjs";
3
+ import { A11Y_COLINDEX, A11Y_COLUMNHEADER, A11Y_ROW, A11Y_ROWGROUP, A11Y_ROWINDEX, A11Y_SCOPE_COL, A11Y_TABINDEX } from "../../../../helpers/a11y.mjs";
4
4
  /**
5
5
  * Column headers renderer responsible for managing (inserting, tracking, rendering) TR and TH elements.
6
6
  *
@@ -67,7 +67,7 @@ export default class ColumnHeadersRenderer extends BaseRenderer {
67
67
  columnHeadersCount
68
68
  } = this.table;
69
69
  if (this.table.isAriaEnabled()) {
70
- setAttribute(this.rootNode, [A11Y_PRESENTATION()]);
70
+ setAttribute(this.rootNode, [A11Y_ROWGROUP()]);
71
71
  }
72
72
  for (let rowHeaderIndex = 0; rowHeaderIndex < columnHeadersCount; rowHeaderIndex += 1) {
73
73
  const {
@@ -89,7 +89,10 @@ export default class ColumnHeadersRenderer extends BaseRenderer {
89
89
  // Remove all accessibility-related attributes for the header to start fresh.
90
90
  removeAttribute(TH, [new RegExp('aria-(.*)'), new RegExp('role')]);
91
91
  if (this.table.isAriaEnabled()) {
92
- setAttribute(TH, [A11Y_COLINDEX(renderedColumnIndex + 1 + this.table.rowHeadersCount), A11Y_TABINDEX(-1), A11Y_COLUMNHEADER(), ...(renderedColumnIndex >= 0 ? [A11Y_SCOPE_COL()] : [])]);
92
+ setAttribute(TH, [A11Y_COLINDEX(renderedColumnIndex + 1 + this.table.rowHeadersCount), A11Y_TABINDEX(-1), A11Y_COLUMNHEADER(), ...(renderedColumnIndex >= 0 ? [A11Y_SCOPE_COL()] : [
93
+ // Adding `role=row` to the corner headers to prevent
94
+ // https://github.com/handsontable/dev-handsontable/issues/1574
95
+ A11Y_ROW()])]);
93
96
  }
94
97
  columnHeaderFunctions[rowHeaderIndex](sourceColumnIndex, TH, rowHeaderIndex);
95
98
  }
@@ -61,7 +61,7 @@ class RowsRenderer extends _base.default {
61
61
  the number of rendered rows by specifying the table height and/or turning off the "renderAllRows" option.`);
62
62
  }
63
63
  if (this.table.isAriaEnabled()) {
64
- (0, _element.setAttribute)(this.rootNode, [(0, _a11y.A11Y_PRESENTATION)()]);
64
+ (0, _element.setAttribute)(this.rootNode, [(0, _a11y.A11Y_ROWGROUP)()]);
65
65
  }
66
66
  this.orderView.setSize(rowsToRender).setOffset(this.table.renderedRowToSource(0)).start();
67
67
  for (let visibleRowIndex = 0; visibleRowIndex < rowsToRender; visibleRowIndex++) {
@@ -7,7 +7,7 @@ import { toSingleLine } from "./../../../../helpers/templateLiteralTag.mjs";
7
7
  import { OrderView } from "./../utils/orderView/index.mjs";
8
8
  import BaseRenderer from "./_base.mjs";
9
9
  import { setAttribute } from "../../../../helpers/dom/element.mjs";
10
- import { A11Y_PRESENTATION, A11Y_ROW, A11Y_ROWINDEX } from "../../../../helpers/a11y.mjs";
10
+ import { A11Y_ROW, A11Y_ROWGROUP, A11Y_ROWINDEX } from "../../../../helpers/a11y.mjs";
11
11
  let performanceWarningAppeared = false;
12
12
 
13
13
  /**
@@ -57,7 +57,7 @@ export default class RowsRenderer extends BaseRenderer {
57
57
  the number of rendered rows by specifying the table height and/or turning off the "renderAllRows" option.`);
58
58
  }
59
59
  if (this.table.isAriaEnabled()) {
60
- setAttribute(this.rootNode, [A11Y_PRESENTATION()]);
60
+ setAttribute(this.rootNode, [A11Y_ROWGROUP()]);
61
61
  }
62
62
  this.orderView.setSize(rowsToRender).setOffset(this.table.renderedRowToSource(0)).start();
63
63
  for (let visibleRowIndex = 0; visibleRowIndex < rowsToRender; visibleRowIndex++) {
package/base.js CHANGED
@@ -43,8 +43,8 @@ Handsontable.hooks = _pluginHooks.default.getSingleton();
43
43
  Handsontable.CellCoords = _src.CellCoords;
44
44
  Handsontable.CellRange = _src.CellRange;
45
45
  Handsontable.packageName = 'handsontable';
46
- Handsontable.buildDate = "27/11/2023 08:13:45";
47
- Handsontable.version = "14.0.0-next-23212d5-20231127";
46
+ Handsontable.buildDate = "28/11/2023 12:48:05";
47
+ Handsontable.version = "14.0.0-next-477622d-20231128";
48
48
  Handsontable.languages = {
49
49
  dictionaryKeys: _registry.dictionaryKeys,
50
50
  getLanguageDictionary: _registry.getLanguageDictionary,
package/base.mjs CHANGED
@@ -35,8 +35,8 @@ Handsontable.hooks = Hooks.getSingleton();
35
35
  Handsontable.CellCoords = CellCoords;
36
36
  Handsontable.CellRange = CellRange;
37
37
  Handsontable.packageName = 'handsontable';
38
- Handsontable.buildDate = "27/11/2023 08:13:52";
39
- Handsontable.version = "14.0.0-next-23212d5-20231127";
38
+ Handsontable.buildDate = "28/11/2023 12:48:12";
39
+ Handsontable.version = "14.0.0-next-477622d-20231128";
40
40
  Handsontable.languages = {
41
41
  dictionaryKeys,
42
42
  getLanguageDictionary,
@@ -114,6 +114,8 @@ function replaceData(data, setDataMapFunction, callbackFunction, config) {
114
114
  hotInstance.render();
115
115
  }
116
116
  if (hotInstance.getSettings().ariaTags) {
117
- (0, _element.setAttribute)(hotInstance.rootElement, [(0, _a11y.A11Y_ROWCOUNT)(hotInstance.countRows()), (0, _a11y.A11Y_COLCOUNT)(hotInstance.countCols())]);
117
+ (0, _element.setAttribute)(hotInstance.rootElement, [(0, _a11y.A11Y_ROWCOUNT)(-1),
118
+ // If run after initialization, add the number of row headers.
119
+ (0, _a11y.A11Y_COLCOUNT)(hotInstance.countCols() + (hotInstance.view ? hotInstance.countRowHeaders() : 0))]);
118
120
  }
119
121
  }
@@ -109,7 +109,9 @@ function replaceData(data, setDataMapFunction, callbackFunction, config) {
109
109
  hotInstance.render();
110
110
  }
111
111
  if (hotInstance.getSettings().ariaTags) {
112
- setAttribute(hotInstance.rootElement, [A11Y_ROWCOUNT(hotInstance.countRows()), A11Y_COLCOUNT(hotInstance.countCols())]);
112
+ setAttribute(hotInstance.rootElement, [A11Y_ROWCOUNT(-1),
113
+ // If run after initialization, add the number of row headers.
114
+ A11Y_COLCOUNT(hotInstance.countCols() + (hotInstance.view ? hotInstance.countRowHeaders() : 0))]);
113
115
  }
114
116
  }
115
117
  export { replaceData };
@@ -25,8 +25,8 @@
25
25
  * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM
26
26
  * USE OR INABILITY TO USE THIS SOFTWARE.
27
27
  *
28
- * Version: 14.0.0-next-23212d5-20231127
29
- * Release date: 22/11/2023 (built at 27/11/2023 08:13:56)
28
+ * Version: 14.0.0-next-477622d-20231128
29
+ * Release date: 29/11/2023 (built at 28/11/2023 12:48:17)
30
30
  */
31
31
  /**
32
32
  * Fix for bootstrap styles
@@ -25,8 +25,8 @@
25
25
  * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM
26
26
  * USE OR INABILITY TO USE THIS SOFTWARE.
27
27
  *
28
- * Version: 14.0.0-next-23212d5-20231127
29
- * Release date: 22/11/2023 (built at 27/11/2023 08:13:56)
28
+ * Version: 14.0.0-next-477622d-20231128
29
+ * Release date: 29/11/2023 (built at 28/11/2023 12:48:17)
30
30
  */
31
31
  /**
32
32
  * Fix for bootstrap styles