@aurodesignsystem-dev/auro-formkit 0.0.0-pr1019.0 → 0.0.0-pr1040.1

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.
@@ -248,8 +248,8 @@ class AuroRadio extends i$2 {
248
248
  },
249
249
 
250
250
  /**
251
+ * Don't add to api.md since changing of this can easily break a11y.
251
252
  * @private
252
- * not to add to api.md since changing of this can easily break a11y.
253
253
  */
254
254
  role: {
255
255
  type: String,
@@ -1796,13 +1796,15 @@ class AuroRadioGroup extends i$2 {
1796
1796
  * @returns {void}
1797
1797
  */
1798
1798
  initializeIndex() {
1799
- if (!this.disabled) {
1799
+ if (!this.disabled && this.items && this.items.length > 0) {
1800
1800
  const index = this.items.findIndex((item) => item.hasAttribute('checked') && !item.hasAttribute('disabled'));
1801
1801
  const nextEnabledIndex = this.items.findIndex((item) => !item.hasAttribute('disabled'));
1802
1802
 
1803
1803
  this.index = index >= 0 ? index : nextEnabledIndex;
1804
- this.items[this.index].setAttribute('tabindex', 0);
1805
- }
1804
+
1805
+ if (this.items[this.index]) {
1806
+ this.items[this.index].setAttribute('tabindex', 0);
1807
+ } }
1806
1808
  }
1807
1809
 
1808
1810
  /**
@@ -223,8 +223,8 @@ class AuroRadio extends i$2 {
223
223
  },
224
224
 
225
225
  /**
226
+ * Don't add to api.md since changing of this can easily break a11y.
226
227
  * @private
227
- * not to add to api.md since changing of this can easily break a11y.
228
228
  */
229
229
  role: {
230
230
  type: String,
@@ -1771,13 +1771,15 @@ class AuroRadioGroup extends i$2 {
1771
1771
  * @returns {void}
1772
1772
  */
1773
1773
  initializeIndex() {
1774
- if (!this.disabled) {
1774
+ if (!this.disabled && this.items && this.items.length > 0) {
1775
1775
  const index = this.items.findIndex((item) => item.hasAttribute('checked') && !item.hasAttribute('disabled'));
1776
1776
  const nextEnabledIndex = this.items.findIndex((item) => !item.hasAttribute('disabled'));
1777
1777
 
1778
1778
  this.index = index >= 0 ? index : nextEnabledIndex;
1779
- this.items[this.index].setAttribute('tabindex', 0);
1780
- }
1779
+
1780
+ if (this.items[this.index]) {
1781
+ this.items[this.index].setAttribute('tabindex', 0);
1782
+ } }
1781
1783
  }
1782
1784
 
1783
1785
  /**
@@ -71,8 +71,8 @@ export class AuroRadio extends LitElement {
71
71
  attribute: boolean;
72
72
  };
73
73
  /**
74
+ * Don't add to api.md since changing of this can easily break a11y.
74
75
  * @private
75
- * not to add to api.md since changing of this can easily break a11y.
76
76
  */
77
77
  role: {
78
78
  type: StringConstructor;
@@ -183,8 +183,8 @@ class AuroRadio extends LitElement {
183
183
  },
184
184
 
185
185
  /**
186
+ * Don't add to api.md since changing of this can easily break a11y.
186
187
  * @private
187
- * not to add to api.md since changing of this can easily break a11y.
188
188
  */
189
189
  role: {
190
190
  type: String,
@@ -1724,13 +1724,15 @@ class AuroRadioGroup extends LitElement {
1724
1724
  * @returns {void}
1725
1725
  */
1726
1726
  initializeIndex() {
1727
- if (!this.disabled) {
1727
+ if (!this.disabled && this.items && this.items.length > 0) {
1728
1728
  const index = this.items.findIndex((item) => item.hasAttribute('checked') && !item.hasAttribute('disabled'));
1729
1729
  const nextEnabledIndex = this.items.findIndex((item) => !item.hasAttribute('disabled'));
1730
1730
 
1731
1731
  this.index = index >= 0 ? index : nextEnabledIndex;
1732
- this.items[this.index].setAttribute('tabindex', 0);
1733
- }
1732
+
1733
+ if (this.items[this.index]) {
1734
+ this.items[this.index].setAttribute('tabindex', 0);
1735
+ } }
1734
1736
  }
1735
1737
 
1736
1738
  /**
@@ -183,8 +183,8 @@ class AuroRadio extends LitElement {
183
183
  },
184
184
 
185
185
  /**
186
+ * Don't add to api.md since changing of this can easily break a11y.
186
187
  * @private
187
- * not to add to api.md since changing of this can easily break a11y.
188
188
  */
189
189
  role: {
190
190
  type: String,
@@ -1724,13 +1724,15 @@ class AuroRadioGroup extends LitElement {
1724
1724
  * @returns {void}
1725
1725
  */
1726
1726
  initializeIndex() {
1727
- if (!this.disabled) {
1727
+ if (!this.disabled && this.items && this.items.length > 0) {
1728
1728
  const index = this.items.findIndex((item) => item.hasAttribute('checked') && !item.hasAttribute('disabled'));
1729
1729
  const nextEnabledIndex = this.items.findIndex((item) => !item.hasAttribute('disabled'));
1730
1730
 
1731
1731
  this.index = index >= 0 ? index : nextEnabledIndex;
1732
- this.items[this.index].setAttribute('tabindex', 0);
1733
- }
1732
+
1733
+ if (this.items[this.index]) {
1734
+ this.items[this.index].setAttribute('tabindex', 0);
1735
+ } }
1734
1736
  }
1735
1737
 
1736
1738
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aurodesignsystem-dev/auro-formkit",
3
- "version": "0.0.0-pr1019.0",
3
+ "version": "0.0.0-pr1040.1",
4
4
  "description": "A collection of web components used to build forms.",
5
5
  "homepage": "https://github.com/AlaskaAirlines/auro-formkit#readme",
6
6
  "bugs": {