diff --git a/playwright/support/sections/SubmitSection.ts b/playwright/support/sections/SubmitSection.ts index a23e0e097..4f6f5edcd 100644 --- a/playwright/support/sections/SubmitSection.ts +++ b/playwright/support/sections/SubmitSection.ts @@ -46,6 +46,8 @@ export class SubmitSection { ): Promise { const question = this.getQuestion(questionName) await question.getByRole('textbox').fill(value) + // Wait for the debounced input handler to fire (INPUT_DEBOUNCE_MS = 400ms) + await this.page.waitForTimeout(500) } /** 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 61fa31ff4..001371ee2 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">