@vaadin/radio-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/radio-group",
3
- "version": "24.2.0-alpha15",
3
+ "version": "24.2.0-alpha16",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -38,12 +38,12 @@
38
38
  ],
39
39
  "dependencies": {
40
40
  "@polymer/polymer": "^3.0.0",
41
- "@vaadin/a11y-base": "24.2.0-alpha15",
42
- "@vaadin/component-base": "24.2.0-alpha15",
43
- "@vaadin/field-base": "24.2.0-alpha15",
44
- "@vaadin/vaadin-lumo-styles": "24.2.0-alpha15",
45
- "@vaadin/vaadin-material-styles": "24.2.0-alpha15",
46
- "@vaadin/vaadin-themable-mixin": "24.2.0-alpha15"
41
+ "@vaadin/a11y-base": "24.2.0-alpha16",
42
+ "@vaadin/component-base": "24.2.0-alpha16",
43
+ "@vaadin/field-base": "24.2.0-alpha16",
44
+ "@vaadin/vaadin-lumo-styles": "24.2.0-alpha16",
45
+ "@vaadin/vaadin-material-styles": "24.2.0-alpha16",
46
+ "@vaadin/vaadin-themable-mixin": "24.2.0-alpha16"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@esm-bundle/chai": "^4.3.4",
@@ -54,5 +54,5 @@
54
54
  "web-types.json",
55
55
  "web-types.lit.json"
56
56
  ],
57
- "gitHead": "043dbb1c2513685a98354921876d35fa18bca7a2"
57
+ "gitHead": "133d3aeb00dedc8be975affa81c7af4b4d22acf6"
58
58
  }
@@ -186,6 +186,19 @@ class RadioGroup extends FieldMixin(
186
186
  this.__unregisterRadioButton = this.__unregisterRadioButton.bind(this);
187
187
  this.__onRadioButtonChange = this.__onRadioButtonChange.bind(this);
188
188
  this.__onRadioButtonCheckedChange = this.__onRadioButtonCheckedChange.bind(this);
189
+
190
+ this._tooltipController = new TooltipController(this);
191
+ this._tooltipController.addEventListener('tooltip-changed', (event) => {
192
+ const tooltip = event.detail.node;
193
+ if (tooltip && tooltip.isConnected) {
194
+ // Tooltip element has been added to the DOM
195
+ const inputs = this.__radioButtons.map((radio) => radio.inputElement);
196
+ this._tooltipController.setAriaTarget(inputs);
197
+ } else {
198
+ // Tooltip element is no longer connected
199
+ this._tooltipController.setAriaTarget([]);
200
+ }
201
+ });
189
202
  }
190
203
 
191
204
  /**
@@ -235,9 +248,11 @@ class RadioGroup extends FieldMixin(
235
248
 
236
249
  // Unregisters the removed radio buttons.
237
250
  this.__filterRadioButtons(removedNodes).forEach(this.__unregisterRadioButton);
251
+
252
+ const inputs = this.__radioButtons.map((radio) => radio.inputElement);
253
+ this._tooltipController.setAriaTarget(inputs);
238
254
  });
239
255
 
240
- this._tooltipController = new TooltipController(this);
241
256
  this.addController(this._tooltipController);
242
257
  }
243
258
 
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/radio-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/radio-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": {