@r2digisolutions/components 0.25.14 → 0.25.15
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.
|
@@ -87,6 +87,8 @@
|
|
|
87
87
|
|
|
88
88
|
const labelId = $derived(`${id}-label`);
|
|
89
89
|
const helperId = $derived(`${id}-helper`);
|
|
90
|
+
// The visible dropzone text must be part of its accessible name (WCAG 2.5.3 Label in Name).
|
|
91
|
+
const dropzoneContentId = $derived(`${id}-dropzone-content`);
|
|
90
92
|
const errorId = $derived(`${id}-error`);
|
|
91
93
|
const maxBytes = $derived(maxSizeMb * 1024 * 1024);
|
|
92
94
|
|
|
@@ -318,10 +320,8 @@
|
|
|
318
320
|
<div
|
|
319
321
|
role="button"
|
|
320
322
|
tabindex={disabled ? -1 : 0}
|
|
321
|
-
aria-labelledby={resolvedLabel ? labelId :
|
|
322
|
-
aria-describedby={
|
|
323
|
-
.filter(Boolean)
|
|
324
|
-
.join(' ') || undefined}
|
|
323
|
+
aria-labelledby={resolvedLabel ? `${labelId} ${dropzoneContentId}` : dropzoneContentId}
|
|
324
|
+
aria-describedby={errorMessage ? errorId : undefined}
|
|
325
325
|
aria-disabled={disabled || undefined}
|
|
326
326
|
ondragenter={handleDragEnter}
|
|
327
327
|
ondragover={handleDragOver}
|
|
@@ -346,6 +346,7 @@
|
|
|
346
346
|
]}
|
|
347
347
|
>
|
|
348
348
|
<div
|
|
349
|
+
id={dropzoneContentId}
|
|
349
350
|
class={[
|
|
350
351
|
'flex',
|
|
351
352
|
vertical
|
|
@@ -398,7 +399,7 @@
|
|
|
398
399
|
{#if resolvedHelperText}
|
|
399
400
|
<p
|
|
400
401
|
id={helperId}
|
|
401
|
-
class={['mt-0.5 leading-relaxed text-secondary text-
|
|
402
|
+
class={['mt-0.5 leading-relaxed text-secondary text-xs', vertical && 'text-center']}
|
|
402
403
|
>
|
|
403
404
|
{resolvedHelperText}
|
|
404
405
|
</p>
|