@vaadin/grid 22.0.4 → 22.0.5

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/grid",
3
- "version": "22.0.4",
3
+ "version": "22.0.5",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -40,19 +40,19 @@
40
40
  "dependencies": {
41
41
  "@open-wc/dedupe-mixin": "^1.3.0",
42
42
  "@polymer/polymer": "^3.0.0",
43
- "@vaadin/checkbox": "^22.0.4",
44
- "@vaadin/component-base": "^22.0.4",
45
- "@vaadin/text-field": "^22.0.4",
46
- "@vaadin/vaadin-lumo-styles": "^22.0.4",
47
- "@vaadin/vaadin-material-styles": "^22.0.4",
48
- "@vaadin/vaadin-themable-mixin": "^22.0.4"
43
+ "@vaadin/checkbox": "^22.0.5",
44
+ "@vaadin/component-base": "^22.0.5",
45
+ "@vaadin/text-field": "^22.0.5",
46
+ "@vaadin/vaadin-lumo-styles": "^22.0.5",
47
+ "@vaadin/vaadin-material-styles": "^22.0.5",
48
+ "@vaadin/vaadin-themable-mixin": "^22.0.5"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@esm-bundle/chai": "^4.3.4",
52
- "@vaadin/polymer-legacy-adapter": "^22.0.4",
52
+ "@vaadin/polymer-legacy-adapter": "^22.0.5",
53
53
  "@vaadin/testing-helpers": "^0.3.2",
54
54
  "lit": "^2.0.0",
55
55
  "sinon": "^9.2.0"
56
56
  },
57
- "gitHead": "55891f68d4da41e846e06dfe51dceba1665e41ce"
57
+ "gitHead": "3e1990867670f3de2dec6fa1200d945623b2710c"
58
58
  }
@@ -94,24 +94,12 @@ export const A11yMixin = (superClass) =>
94
94
  * @protected
95
95
  */
96
96
  _a11yUpdateRowLevel(row, level) {
97
- row.setAttribute('aria-level', level + 1);
98
- }
99
-
100
- /**
101
- * @param {!HTMLElement} row
102
- * @param {boolean} detailsOpened
103
- * @protected
104
- */
105
- _a11yUpdateRowDetailsOpened(row, detailsOpened) {
106
- const detailsCell = row.querySelector('[part~=details-cell]');
107
-
108
- Array.from(row.children).forEach((cell) => {
109
- if (detailsCell) {
110
- cell.setAttribute('aria-expanded', detailsOpened);
111
- } else {
112
- cell.removeAttribute('aria-expanded');
113
- }
114
- });
97
+ // Set level for the expandable rows itself, and all the nested rows.
98
+ if (level > 0 || this.__isRowCollapsible(row) || this.__isRowExpandable(row)) {
99
+ row.setAttribute('aria-level', level + 1);
100
+ } else {
101
+ row.removeAttribute('aria-level');
102
+ }
115
103
  }
116
104
 
117
105
  /**
@@ -84,7 +84,6 @@ export const RowDetailsMixin = (superClass) =>
84
84
  if (!row.querySelector('[part~=details-cell]')) {
85
85
  this._updateRow(row, this._columnTree[this._columnTree.length - 1]);
86
86
  const isDetailsOpened = this._isDetailsOpened(row._item);
87
- this._a11yUpdateRowDetailsOpened(row, isDetailsOpened);
88
87
  this._toggleDetailsCell(row, isDetailsOpened);
89
88
  }
90
89
  });
@@ -908,7 +908,6 @@ class Grid extends ElementMixin(
908
908
 
909
909
  this._a11yUpdateRowLevel(row, model.level);
910
910
  this._a11yUpdateRowSelected(row, model.selected);
911
- this._a11yUpdateRowDetailsOpened(row, model.detailsOpened);
912
911
 
913
912
  row.toggleAttribute('expanded', model.expanded);
914
913
  row.toggleAttribute('selected', model.selected);