From d8d34030f5ffac26d29df835a374362d881f6257 Mon Sep 17 00:00:00 2001 From: Christian Hartmann Date: Fri, 12 Jun 2026 11:34:36 +0200 Subject: [PATCH] fix: validation error shown in NcNoteCard for QuestionShort also add missing aria error handling Signed-off-by: Christian Hartmann --- src/components/Questions/QuestionColor.vue | 2 + src/components/Questions/QuestionDate.vue | 2 + src/components/Questions/QuestionDropdown.vue | 2 + src/components/Questions/QuestionFile.vue | 4 +- .../Questions/QuestionLinearScale.vue | 2 + src/components/Questions/QuestionLong.vue | 2 + src/components/Questions/QuestionRanking.vue | 4 +- src/components/Questions/QuestionShort.vue | 56 ++++++++++--------- 8 files changed, 47 insertions(+), 27 deletions(-) diff --git a/src/components/Questions/QuestionColor.vue b/src/components/Questions/QuestionColor.vue index 2655cb1b9..89f45b7bc 100644 --- a/src/components/Questions/QuestionColor.vue +++ b/src/components/Questions/QuestionColor.vue @@ -19,6 +19,8 @@ :modelValue="pickedColor" advancedFields :aria-required="isRequired" + :aria-errormessage="hasError ? errorId : undefined" + :aria-invalid="hasError ? 'true' : undefined" @update:modelValue="onUpdatePickedColor"> {{ colorPickerPlaceholder }} diff --git a/src/components/Questions/QuestionDate.vue b/src/components/Questions/QuestionDate.vue index e4e5aa1f3..087cf0b02 100644 --- a/src/components/Questions/QuestionDate.vue +++ b/src/components/Questions/QuestionDate.vue @@ -97,6 +97,8 @@ :disabledDate="disabledDates" :disabledTime="disabledTimes" :aria-required="isRequired" + :aria-errormessage="hasError ? errorId : undefined" + :aria-invalid="hasError ? 'true' : undefined" clearable @update:modelValue="onValueChange" /> diff --git a/src/components/Questions/QuestionDropdown.vue b/src/components/Questions/QuestionDropdown.vue index e937a79a3..4e3ea9a4e 100644 --- a/src/components/Questions/QuestionDropdown.vue +++ b/src/components/Questions/QuestionDropdown.vue @@ -41,6 +41,8 @@ :searchable="false" label="text" :aria-label-combobox="selectOptionPlaceholder" + :aria-errormessage="hasError ? errorId : undefined" + :aria-invalid="hasError ? 'true' : undefined" @invalid.prevent="validate" @update:modelValue="onInput" /> diff --git a/src/components/Questions/QuestionFile.vue b/src/components/Questions/QuestionFile.vue index bfca0c56b..e6dda6b06 100644 --- a/src/components/Questions/QuestionFile.vue +++ b/src/components/Questions/QuestionFile.vue @@ -111,7 +111,9 @@ class="question__input-wrapper" role="group" :aria-labelledby="titleId" - :aria-describedby="description ? descriptionId : undefined"> + :aria-describedby="description ? descriptionId : undefined" + :aria-errormessage="hasError ? errorId : undefined" + :aria-invalid="hasError ? 'true' : undefined">