Skip to content

Commit aad37a5

Browse files
authored
Merge pull request #616 from ShallowRed/fix-input-aria-describedby
fix: ♿ Ne pas utiliser input aria-describedby si description absente du DOM
2 parents 2c48c0b + 8a79c2d commit aad37a5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/DsfrInput/DsfrInputGroup.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const props = withDefaults(defineProps<{
2323
labelClass: '',
2424
modelValue: '',
2525
wrapperClass: '',
26+
placeholder: undefined,
2627
errorMessage: undefined,
2728
validMessage: undefined,
2829
})
@@ -50,7 +51,7 @@ const messageClass = computed(() => props.errorMessage ? 'fr-error-text' : 'fr-v
5051
:is-invalid="!!errorMessage"
5152
:label="label"
5253
:hint="hint"
53-
:description-id="descriptionId"
54+
:description-id="(message && descriptionId) || undefined"
5455
:label-visible="labelVisible"
5556
:model-value="modelValue"
5657
:placeholder="placeholder"

0 commit comments

Comments
 (0)