From 59ed470c609e4a8680b4282a635c127d200521bd Mon Sep 17 00:00:00 2001 From: qhanson55 Date: Thu, 19 Dec 2024 18:10:58 -0800 Subject: [PATCH] Ensured and added keyboard navigation for public facing components --- .../submission/SubmissionAssistance.vue | 8 +++++ .../submission/SubmissionIntakeForm.vue | 32 +++++++++++++++---- frontend/src/components/layout/Footer.vue | 3 -- frontend/src/utils/utils.ts | 21 ++++++++++++ 4 files changed, 55 insertions(+), 9 deletions(-) diff --git a/frontend/src/components/housing/submission/SubmissionAssistance.vue b/frontend/src/components/housing/submission/SubmissionAssistance.vue index c5ea882a..55b4dbfc 100644 --- a/frontend/src/components/housing/submission/SubmissionAssistance.vue +++ b/frontend/src/components/housing/submission/SubmissionAssistance.vue @@ -62,7 +62,10 @@ const confirmSubmit = () => {
Assistance
{ width: 20rem; } +:deep(.assistance-tab:focus-visible) { + outline: 0.25rem solid $app-hover; + outline-offset: 0.125rem; +} + .assistance-tab { cursor: pointer; position: absolute; diff --git a/frontend/src/components/housing/submission/SubmissionIntakeForm.vue b/frontend/src/components/housing/submission/SubmissionIntakeForm.vue index 96044e70..2aa91999 100644 --- a/frontend/src/components/housing/submission/SubmissionIntakeForm.vue +++ b/frontend/src/components/housing/submission/SubmissionIntakeForm.vue @@ -58,7 +58,7 @@ import { SubmissionType } from '@/utils/enums/housing'; import { confirmationTemplateSubmission } from '@/utils/templates'; -import { omit } from '@/utils/utils'; +import { getHTMLElement, omit } from '@/utils/utils'; import type { Ref } from 'vue'; import type { AutoCompleteCompleteEvent } from 'primevue/autocomplete'; @@ -1498,6 +1498,7 @@ onBeforeMount(async () => { values.permits?.hasAppliedProvincialPermits === BasicResponse.UNSURE " class="col-12" + ref="appliedPermitsContainer" >
@@ -1565,7 +1566,16 @@ onBeforeMount(async () => { permitTypeId: undefined, trackingId: undefined, submittedDate: undefined - }) + }); + nextTick(() => { + const addedPermit = getHTMLElement( + $refs.appliedPermitsContainer as HTMLElement, + 'div[name*=\'permitTypeId\'] span[role=\'combobox\']' + ); + if (addedPermit) { + addedPermit.focus(); + } + }); " > {