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">