@vaadin/checkbox-group 24.2.0-alpha15 → 24.2.0-alpha16

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/checkbox-group",
3
- "version": "24.2.0-alpha15",
3
+ "version": "24.2.0-alpha16",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -36,13 +36,13 @@
36
36
  ],
37
37
  "dependencies": {
38
38
  "@polymer/polymer": "^3.0.0",
39
- "@vaadin/a11y-base": "24.2.0-alpha15",
40
- "@vaadin/checkbox": "24.2.0-alpha15",
41
- "@vaadin/component-base": "24.2.0-alpha15",
42
- "@vaadin/field-base": "24.2.0-alpha15",
43
- "@vaadin/vaadin-lumo-styles": "24.2.0-alpha15",
44
- "@vaadin/vaadin-material-styles": "24.2.0-alpha15",
45
- "@vaadin/vaadin-themable-mixin": "24.2.0-alpha15"
39
+ "@vaadin/a11y-base": "24.2.0-alpha16",
40
+ "@vaadin/checkbox": "24.2.0-alpha16",
41
+ "@vaadin/component-base": "24.2.0-alpha16",
42
+ "@vaadin/field-base": "24.2.0-alpha16",
43
+ "@vaadin/vaadin-lumo-styles": "24.2.0-alpha16",
44
+ "@vaadin/vaadin-material-styles": "24.2.0-alpha16",
45
+ "@vaadin/vaadin-themable-mixin": "24.2.0-alpha16"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@esm-bundle/chai": "^4.3.4",
@@ -53,5 +53,5 @@
53
53
  "web-types.json",
54
54
  "web-types.lit.json"
55
55
  ],
56
- "gitHead": "043dbb1c2513685a98354921876d35fa18bca7a2"
56
+ "gitHead": "133d3aeb00dedc8be975affa81c7af4b4d22acf6"
57
57
  }
@@ -162,6 +162,19 @@ class CheckboxGroup extends FieldMixin(FocusMixin(DisabledMixin(ElementMixin(The
162
162
  this.__unregisterCheckbox = this.__unregisterCheckbox.bind(this);
163
163
  this.__onCheckboxChange = this.__onCheckboxChange.bind(this);
164
164
  this.__onCheckboxCheckedChanged = this.__onCheckboxCheckedChanged.bind(this);
165
+
166
+ this._tooltipController = new TooltipController(this);
167
+ this._tooltipController.addEventListener('tooltip-changed', (event) => {
168
+ const tooltip = event.detail.node;
169
+ if (tooltip && tooltip.isConnected) {
170
+ // Tooltip element has been added to the DOM
171
+ const inputs = this.__checkboxes.map((checkbox) => checkbox.inputElement);
172
+ this._tooltipController.setAriaTarget(inputs);
173
+ } else {
174
+ // Tooltip element is no longer connected
175
+ this._tooltipController.setAriaTarget([]);
176
+ }
177
+ });
165
178
  }
166
179
 
167
180
  /**
@@ -191,10 +204,12 @@ class CheckboxGroup extends FieldMixin(FocusMixin(DisabledMixin(ElementMixin(The
191
204
  addedCheckboxes.forEach(this.__registerCheckbox);
192
205
  removedCheckboxes.forEach(this.__unregisterCheckbox);
193
206
 
207
+ const inputs = this.__checkboxes.map((checkbox) => checkbox.inputElement);
208
+ this._tooltipController.setAriaTarget(inputs);
209
+
194
210
  this.__warnOfCheckboxesWithoutValue(addedCheckboxes);
195
211
  });
196
212
 
197
- this._tooltipController = new TooltipController(this);
198
213
  this.addController(this._tooltipController);
199
214
  }
200
215
 
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/checkbox-group",
4
- "version": "24.2.0-alpha15",
4
+ "version": "24.2.0-alpha16",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/checkbox-group",
4
- "version": "24.2.0-alpha15",
4
+ "version": "24.2.0-alpha16",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {