@onsvisual/svelte-components 1.1.58 → 1.1.59

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.
@@ -56,11 +56,22 @@
56
56
  </script>
57
57
 
58
58
  <div class="ons-field {cls}">
59
- {#if label}<label class="ons-label" for={id} class:ons-u-vh={hideLabel}>{label}</label>{/if}
60
- {#if description}<span
61
- id="description-hint"
62
- class="ons-label__description ons-input--with-description">{description}</span
63
- >{/if}
59
+ {#if label}
60
+ <label
61
+ class="ons-label"
62
+ class:ons-label--with-description={description}
63
+ class:ons-u-vh={hideLabel}
64
+ aria-describedby={description ? `${id}-description-hint` : null}
65
+ for={id}
66
+ >
67
+ {label}
68
+ </label>
69
+ {/if}
70
+ {#if description}
71
+ <span id="{id}-description-hint" class="ons-label__description ons-input--with-description">
72
+ {description}
73
+ </span>
74
+ {/if}
64
75
  <select
65
76
  {id}
66
77
  {name}
@@ -221,11 +221,22 @@
221
221
  {/if}
222
222
  {:else}
223
223
  <div class="ons-field {cls}">
224
- {#if label}<label for={id} class="ons-label" class:ons-u-vh={hideLabel}>{label}</label>{/if}
225
- {#if description}<span
226
- id="description-hint"
227
- class="ons-label__description ons-input--with-description">{description}</span
228
- >{/if}
224
+ {#if label}
225
+ <label
226
+ class="ons-label"
227
+ class:ons-label--with-description={description}
228
+ class:ons-u-vh={hideLabel}
229
+ aria-describedby={description ? `${id}-description-hint` : null}
230
+ for={id}
231
+ >
232
+ {label}
233
+ </label>
234
+ {/if}
235
+ {#if description}
236
+ <span id="{id}-description-hint" class="ons-label__description ons-input--with-description">
237
+ {description}
238
+ </span>
239
+ {/if}
229
240
  <div class="ons-autocomplete-wrapper">
230
241
  {#if mounted}
231
242
  <div
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onsvisual/svelte-components",
3
- "version": "1.1.58",
3
+ "version": "1.1.59",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "npm run build:package && npm run build:docs",