55 id =" header"
66 class =" text-black"
77 >
8- <a
9- class =" skip-to-main-content-link"
10- href =" #main"
8+ <div
119 id =" skipToMain"
12- v-on:blur =" skipToMainFocused = false"
13- v-on:click.prevent =" focusMain"
14- v-on:focus =" skipToMainFocused = true"
1510 >
16- Skip to main content
17- </a >
11+ <a
12+ v-for =" skipLink in skipLinks"
13+ class =" skip-to-main-content-link"
14+ v-bind:key =" skipLink.id"
15+ v-bind:href =" `#${skipLink.id}`"
16+ v-on:blur =" skipToMainFocused = false"
17+ v-on:click.prevent =" focusElement(skipLink.id)"
18+ v-on:focus =" skipToMainFocused = true"
19+ >
20+ Skip to {{ skipLink.where }}
21+ </a >
22+ </div >
1823 <Header
1924 v-bind:show-open-preview-button =" isPreviewDrawer"
2025 />
3237 id =" main-block"
3338 v-bind:class =" ['row', 'col', 'bg-white', 'q-pa-md', isMainConnected ? '' : 'elevated rounded-borders q-mx-lg']"
3439 >
35- <aside class =" col-auto gt-xs" >
40+ <aside
41+ class =" col-auto gt-xs"
42+ id =" stepper"
43+ tabindex =" 0"
44+ >
3645 <Stepper />
3746 </aside >
38- <div
39- id =" form"
47+ <form
4048 class =" col column"
49+ id =" form"
50+ tabindex =" 0"
4151 >
4252 <div id =" form-content" >
4353 <router-view />
6070 no-caps
6171 v-on:click =" togglePreview"
6272 />
63- </div >
73+ </form >
6474 </div >
6575 <component
6676 v-if =" !isOnlyForm"
@@ -136,8 +146,8 @@ export default defineComponent({
136146 isPreviewDrawerOpen .value = false
137147 }
138148 return {
139- focusMain : () => {
140- const element = window .document .getElementById (' main ' )
149+ focusElement : (id : string ) => {
150+ const element = window .document .getElementById (id )
141151 if (! element ) return
142152 element .focus ()
143153 },
@@ -149,6 +159,10 @@ export default defineComponent({
149159 isPreviewDrawerOpen ,
150160 isPreviewDrawer: computed (() => q .screen .sm || q .screen .md ),
151161 isMainConnected: computed (() => q .screen .xs || q .screen .sm ),
162+ skipLinks: [
163+ { id: ' form' , where: ' main content' },
164+ { id: ' stepper' , where: ' stepper navigation' }
165+ ],
152166 skipToMainFocused: ref (false ),
153167 onResize ,
154168 togglePreview : () => {
0 commit comments