@worksafevictoria/wcl7.5 1.11.0 → 1.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,44 +6,54 @@
6
6
  >
7
7
  <!-- Top menu -->
8
8
  <div class="logo">
9
- <nuxt-link class="dark" to="/">
10
- <img
11
- :alt="
12
- isWorkWell
13
- ? 'Work Well Victoria - Logo'
14
- : 'Work Safe Victoria - Logo'
15
- "
16
- width="127"
17
- height="55"
18
- :src="isWorkWell ? WorkWellLogo : WorkSafeLogo"
19
- />
20
- </nuxt-link>
21
- <span class="logo__nav">
22
- <table>
23
- <tbody>
24
- <tr>
25
- <td>
9
+ <!-- Mobile Menu -->
10
+ <div v-if="screen === 'mobile'" class="app-header__mobile-menu-container">
11
+ <a class="dark" role="button" @click.prevent="showMobileMenu">
12
+ <menu-icon class="menu-icon" />
13
+ </a>
14
+ </div>
15
+ <!-- Logo -->
16
+ <nuxt-link class="dark" to="/">
17
+ <img
18
+ :class="screen === 'mobile' ? 'LogoImgMobile' : 'LogoImg'"
19
+ :alt="
20
+ isWorkWell
21
+ ? 'Work Well Victoria - Logo'
22
+ : 'Work Safe Victoria - Logo'
23
+ "
24
+ :src="isWorkWell ? WorkWellLogo : WorkSafeLogo"
25
+ />
26
+ </nuxt-link>
27
+ <span :class="screen === 'mobile' ? 'logo__nav_mobile' : 'logo__nav'">
28
+ <!-- Roles added for accessibility -->
29
+ <table role="presentation" >
30
+ <tbody role="presentation">
31
+ <tr role="presentation">
32
+ <td :class="screen === 'mobile' ? 'td_mobile' : ''">
33
+ <!-- Language link -->
26
34
  <nuxt-link
27
- to="/languages"
28
- @click.native="fireAnalytics('Choose your language', '/languages')"
29
- title="Language"
30
- >
31
- <span v-if="!topLevelIconsOnly">Choose your language </span>
32
- <img alt="Language Icon" width="20px" height="20px" :src=LanguageIcon />
33
- </nuxt-link>
35
+ :class="screen === 'mobile' ? 'mobile-link' : ''"
36
+ to="/languages"
37
+ @click.native="fireAnalytics('Choose your language', '/languages')"
38
+ title="Language"
39
+ >
40
+ <span v-if="screen !== 'mobile'">Choose your language </span>
41
+ <img alt="Language Icon" width="15px" height="15px" :src=LanguageIcon />
42
+ </nuxt-link>
34
43
  </td>
35
- <td>
36
- <a href="javascript:void(0)" @click="show = !show" @keyup.esc="show = !show" title="Contrast" ref="selectContrast">
37
- <span v-if="!topLevelIconsOnly">Adjust contrast</span> <img alt="Contrast Icon" width="20px" height="20px" :src=ContrastIcon />
44
+ <td :class="screen === 'mobile' ? 'td_mobile' : ''">
45
+ <!-- Contrast link -->
46
+ <a href="javascript:void(0)" :class="screen === 'mobile' ? 'mobile-link' : ''" @click="show = !show" @keyup.esc="show = !show" title="Contrast" ref="selectContrast">
47
+ <span v-if="screen !== 'mobile'">Adjust contrast</span> <img alt="Contrast Icon" width="15px" height="15px" :src=ContrastIcon />
38
48
  </a>
39
49
  <div
40
50
  ref="contrastChoices"
41
51
  class="flex-container"
42
52
  v-if="show"
43
53
  >
44
- <div class="contrast_slide--box-list">
54
+ <div class="flex-item contrast_slide--box-list">
45
55
  <div v-for="list in lists" :key="list.value">
46
- <label>
56
+ <label :class="{'last-radio': list.label==='Greyscale'}">
47
57
  <input
48
58
  type="radio"
49
59
  :name="list.name"
@@ -57,20 +67,23 @@
57
67
  </div>
58
68
  </div>
59
69
  </td>
60
- <td>
70
+ <td :class="screen === 'mobile' ? 'td_mobile' : ''">
71
+ <!-- Search link -->
61
72
  <nuxt-link
73
+ style="height: 40px;"
62
74
  class="cta-button cta-button--text-only cta-button--slim"
63
75
  to="/search"
64
76
  title="Search"
65
- ><span v-if="!topLevelButtonIconsOnly">Search &nbsp;</span> <img alt="Search Icon" width="20px" height="20px" :src=NavSearchIcon />
77
+ ><span v-if="screen !== 'mobile'">Search &nbsp;</span> <img alt="Search Icon" width="15px" height="15px" :src=NavSearchIcon />
66
78
  </nuxt-link>
67
79
  </td>
68
- <td>
80
+ <td :class="screen === 'mobile' ? 'td_mobile-last' : ''">
81
+ <!-- Login link -->
69
82
  <nuxt-link
70
83
  class="cta-button cta-button--text-only cta-button--slim cta-button--dark-no-filter"
71
84
  to="/login"
72
85
  title="Login"
73
- ><span v-if="!topLevelButtonIconsOnly">Login &nbsp;</span><span><img alt="Login Icon" width="20px" height="20px" :src=LoginLeft /></span>
86
+ ><span v-if="screen !== 'mobile'">Login &nbsp;</span><span><img alt="Login Icon" width="15px" height="15px" :src=LoginLeft /></span>
74
87
  </nuxt-link>
75
88
  </td>
76
89
  </tr>
@@ -79,8 +92,9 @@
79
92
  </span>
80
93
  </div>
81
94
  <!-- Bottom menu -->
82
- <div class="app-header__wrap" @keyup.esc="closeMegaMenu">
83
- <div class="app-header__close-button mobile-close">
95
+ <div class="app-header__wrap" :class="screen === 'mobile' ? 'app-header__wrap_mobile' : ''" @keyup.esc="closeMegaMenu">
96
+ <div class="app-header__close-button mobile-close">
97
+ <!-- Close Button -->
84
98
  <button
85
99
  v-if="
86
100
  (isMobileMenuOpen && screen === 'mobile' && !isSecondLevelOpen)
@@ -93,15 +107,7 @@
93
107
  Close menu
94
108
  </button>
95
109
  </div>
96
- <div
97
- v-if="
98
- (!isSecondLevelOpen && screen === 'desktop') ||
99
- (!isMobileMenuOpen && screen === 'mobile')
100
- "
101
- class="app-header__app-branding"
102
- >
103
-
104
- </div>
110
+ <!-- Bottom menu Items -->
105
111
  <nav
106
112
  v-if="isMobileMenuOpen || screen === 'desktop'"
107
113
  :class="{
@@ -151,6 +157,7 @@
151
157
  >
152
158
  <span>{{ firstLevelLink.title }}</span>
153
159
  </nuxt-link>
160
+ <!-- Sub-Menu 2nd Level -->
154
161
  <div v-if="isSecondLevelOpen" class="sub-nav-container">
155
162
  <div class="app-header__close-button">
156
163
  <button
@@ -187,6 +194,7 @@
187
194
  screen === 'mobile' && isSecondLevelOpen,
188
195
  }"
189
196
  >
197
+ <!-- Selected Title -->
190
198
  <div
191
199
  class="selected-title"
192
200
  :class="{ 'selected-title--chrome': isChrome }"
@@ -203,6 +211,7 @@
203
211
  </nuxt-link>
204
212
  <span v-else>{{ firstLevelLink.title }}</span>
205
213
  </div>
214
+ <!-- Selected Items -->
206
215
  <div class="selected-items">
207
216
  <ul v-if="firstLevelLink.below" class="sub-nav-group">
208
217
  <li
@@ -252,6 +261,7 @@
252
261
  >
253
262
  <span>{{ secondLevelLink.title }}</span>
254
263
  </nuxt-link>
264
+ <!-- Sub Menu - Third Level Menu -->
255
265
  <div v-if="isThirdLevelOpen" class="sub-nav">
256
266
  <div class="sub-nav__wrap">
257
267
  <div class="selected-title">
@@ -311,255 +321,18 @@
311
321
  </div>
312
322
  </div>
313
323
  </li>
314
-
315
- <!-- More action button in bottom menu -->
316
-
317
- <li class="nav-item" id="moreDesktop" v-if="screen === 'desktop' && this.moreList.length > 0">
318
- <a class="dark" role="button" @click="showMore = !showMore">
319
- <span>More</span>
320
- <caret-down class="caret-down" style="padding-top: 4px; height: 16px; width: 16px"/>
321
- </a>
322
- <div
323
- v-if="showMore"
324
- class="styled-scrollbar"
325
- >
326
- <div >
327
- <div class="sub-nav-container__innermore">
328
- <ul id="moreMenu">
329
- <li v-for="(firstLevelLink, parentIndex) in this.moreList"
330
- :key="firstLevelLink.key"
331
- :ref="`firstLevelMenuItemM-${parentIndex}`"
332
- class="nav-item more-menu"
333
- >
334
- <a
335
- v-if="firstLevelLink.below"
336
- class="dark"
337
- href
338
- role="button"
339
- aria-expanded="false"
340
- @click.prevent="firstLevelClick(firstLevelLink,`firstLevelMenuItemM-${parentIndex}`,)"
341
- @mouseover="mouseHover('firstLevelMenuItemM', parentIndex)"
342
- @mouseleave="mouseLeave('firstLevelMenuItemM', parentIndex)"
343
- @focusin="mouseHover('firstLevelMenuItemM', parentIndex)"
344
- @focusout="mouseLeave('firstLevelMenuItemM', parentIndex)"
345
- >
346
- <span>{{ firstLevelLink.title }}</span>
347
-
348
- <caret-right
349
- v-if="!isSecondLevelOpen && !isThirdLevelOpen"
350
- class="caret-right"
351
- />
352
- </a>
353
- <a
354
- v-else-if="!firstLevelLink.relative"
355
- :href="firstLevelLink.absolute"
356
- target="_blank"
357
- @click.native="showMore = !showMore"
358
- class="dark"
359
- >
360
- <span>{{ firstLevelLink.title }}</span>
361
-
362
- </a>
363
- <nuxt-link
364
- v-else
365
- class="dark"
366
- :to="firstLevelLink.relative"
367
- @click.native="showMore = !showMore; fireAnalytics(firstLevelLink.title, firstLevelLink.relative)"
368
- >
369
- <span>{{ firstLevelLink.title }}</span>
370
- <caret-right
371
- v-if="!isSecondLevelOpen && !isThirdLevelOpen"
372
- class="caret-right"
373
- />
374
- </nuxt-link>
375
- <div v-if="isSecondLevelOpen" class="sub-nav-container">
376
- <div class="app-header__close-button">
377
- <button
378
- v-if="screen === 'mobile'"
379
- ref="menuBackButton"
380
- class="dark"
381
- @click="mobileGoBack"
382
- @keydown.tab="submenuFocus"
383
- >
384
- <caret-left/>
385
- {{ isThirdLevelOpen ? firstLevelItemName : 'Main menu' }}
386
- </button>
387
- <button
388
- v-if="
389
- (isSecondLevelOpen && screen === 'desktop') ||
390
- (isMobileMenuOpen && screen === 'mobile')
391
- "
392
- ref="closeMenuButton"
393
- class="dark"
394
- @click="closeMegaMenu"
395
- >
396
- <img :alt="Close" width="12" height="12" :src="Close"/>
397
- Close menu
398
- </button>
399
- </div>
400
- <div
401
- class="sub-nav-container__inner"
402
- :class="{ 'styled-scrollbar': screen === 'desktop' }"
403
- >
404
- <div
405
- class="sub-nav-container__wrap"
406
- :class="{'styled-scrollbar': screen === 'mobile' && isSecondLevelOpen,}"
407
- >
408
- <div
409
- class="selected-title"
410
- :class="{ 'selected-title--chrome': isChrome }"
411
- >
412
- <nuxt-link
413
- v-if="firstLevelLink.relative"
414
- :ref="`secondLevelSelectedTitleM-${parentIndex}`"
415
- :to="firstLevelLink.relative"
416
- class="dark"
417
- @click.native="fireAnalytics(firstLevelLink.title, firstLevelLink.relative)"
418
- @keydown.tab.native="backBtnFocus($event)"
419
- >
420
- <span>{{ firstLevelLink.title }}</span>
421
- </nuxt-link>
422
- <span v-else>{{ firstLevelLink.title }}</span>
423
- </div>
424
- <div class="selected-items">
425
- <ul v-if="firstLevelLink.below" class="sub-nav-group">
426
- <li
427
- v-for="(
428
- secondLevelLink, secondIndex
429
- ) in firstLevelLink.below"
430
- :key="secondLevelLink.key"
431
- :ref="`secondLevelMenuItemM-${parentIndex}-${secondIndex}`"
432
- class="sub-nav-parent-item"
433
- >
434
- <a
435
- v-if="secondLevelLink.below"
436
- href
437
- class="dark"
438
- role="button"
439
- aria-expanded="false"
440
- @keydown.tab="searchFocus(secondIndex,firstLevelLink.below.length,$event,)"
441
- @click.prevent="secondLevelClick(secondLevelLink,`secondLevelMenuItemM-${parentIndex}-${secondIndex}`,)"
442
- @mouseover="mouseHover('secondLevelMenuItemM',parentIndex,secondIndex,)"
443
- @mouseleave="mouseLeave('secondLevelMenuItemM',parentIndex,secondIndex,)"
444
- @focusin="mouseHover('secondLevelMenuItemM',parentIndex,secondIndex,)"
445
- @focusout="mouseLeave('secondLevelMenuItemM',parentIndex,secondIndex,)"
446
- >
447
- <span>{{ secondLevelLink.title }}</span>
448
- <caret-right
449
- v-if="!(screen === 'mobile' && isThirdLevelOpen)"
450
- class="caret-right"
451
- />
452
- </a>
453
- <a
454
- v-else-if="!secondLevelLink.relative"
455
- :href="secondLevelLink.absolute"
456
- class="dark"
457
- >
458
- <span>{{ secondLevelLink.title }}</span>
459
- </a>
460
- <nuxt-link
461
- v-else
462
- class="dark"
463
- :to="secondLevelLink.relative"
464
- @keydown.tab.native="searchFocus( secondIndex,firstLevelLink.below.length,$event,)"
465
- @mouseover.native="mouseHover('secondLevelMenuItemM',parentIndex,secondIndex,)"
466
- @mouseleave.native="mouseLeave('secondLevelMenuItemM',parentIndex,secondIndex,)"
467
- @focusin.native="mouseHover('secondLevelMenuItemM',parentIndex,secondIndex,)"
468
- @focusout.native="mouseLeave('secondLevelMenuItemM',parentIndex,secondIndex,)"
469
- @click.native="fireAnalytics(secondLevelLink.title, secondLevelLink.relative)"
470
- >
471
- <span>{{ secondLevelLink.title }}</span>
472
- </nuxt-link>
473
- <div v-if="isThirdLevelOpen" class="sub-nav">
474
- <div class="sub-nav__wrap">
475
- <div class="selected-title">
476
- <nuxt-link
477
- v-if="secondLevelLink.relative"
478
- :ref="`secondLevelSelectedTitleM-${parentIndex}-${secondIndex}`"
479
- :to="secondLevelLink.relative"
480
- class="dark"
481
- @click.native="fireAnalytics(secondLevelLink.title, secondLevelLink.relative)"
482
- @keydown.tab.native="backBtnFocus($event)"
483
- >
484
- <span>{{ secondLevelLink.title }}</span>
485
- </nuxt-link>
486
- <span v-else>{{ secondLevelLink.title }}</span>
487
- </div>
488
- <div class="selected-sub-nav">
489
- <ul
490
- v-if="secondLevelLink.below"
491
- class="sub-nav-group"
492
- >
493
- <li
494
- v-for="(
495
- thirdLevelLink, thirdIndex
496
- ) in secondLevelLink.below"
497
- :key="thirdLevelLink.key"
498
- :ref="`thirdLevelMenuItemM-${parentIndex}-${secondIndex}-${thirdIndex}`"
499
- >
500
- <nuxt-link
501
- v-if="thirdLevelLink.relative"
502
- class="dark"
503
- :to="thirdLevelLink.relative"
504
- @keydown.tab.native="searchFocus(thirdIndex,secondLevelLink.below.length,$event,)"
505
- @mouseover.native="mouseHover('thirdLevelMenuItemM',parentIndex,secondIndex,thirdIndex,)"
506
- @mouseleave.native="mouseLeave('thirdLevelMenuItemM',parentIndex,secondIndex,thirdIndex,)"
507
- @focusin.native="mouseHover('thirdLevelMenuItemM',parentIndex,secondIndex,thirdIndex,)"
508
- @focusout.native="mouseLeave('thirdLevelMenuItemM',parentIndex,secondIndex,thirdIndex,)"
509
- @click.native="fireAnalytics(thirdLevelLink.title, thirdLevelLink.relative)"
510
- >
511
- <span>{{ thirdLevelLink.title }}</span>
512
- </nuxt-link>
513
- <a
514
- v-else
515
- class="dark"
516
- :href="thirdLevelLink.absolute"
517
- >
518
- <span>{{ thirdLevelLink.title }}</span>
519
- </a>
520
- </li>
521
- </ul>
522
- </div>
523
- </div>
524
- </div>
525
- </li>
526
- </ul>
527
- </div>
528
- </div>
529
- </div>
530
- </div>
531
- </li>
532
- </ul>
533
- </div>
534
- </div>
535
-
536
-
537
- </div>
538
- </li>
539
324
  <li v-if="isWorkWell && screen === 'desktop'" class="nav-item hide">
540
325
  <a href="#" class="dark" @focus="resetTab"></a>
541
326
  </li>
542
- </ul>
543
-
544
-
327
+ </ul>
545
328
  </nav>
546
- <div v-if="screen === 'mobile'" class="app-header__mobile-menu-container">
547
- <ul id="mobileitems">
548
- <li v-if="!isMobileMenuOpen">
549
- <a class="dark" role="button" @click.prevent="showMobileMenu">
550
- <span>Menu</span>
551
- <menu-icon class="menu-icon" />
552
- </a>
553
- </li>
554
- </ul>
555
- </div>
556
329
  </div>
557
330
  </header>
558
331
  </div>
559
332
  </template>
560
333
 
561
334
  <script>
562
- import ModalSearch from './ModalSearch/index.vue'
335
+
563
336
  import Close from './../../../assets/icons/close.svg?url'
564
337
  import WorkSafeLogo from './../../../assets/icons/WSV-reversed.svg?url'
565
338
  import WorkWellLogo from './../../../assets/icons/AppFooter/logo-workwell-reversed.svg?url'
@@ -579,16 +352,11 @@ import { ref } from "vue";
579
352
  export default {
580
353
  setup() {
581
354
  const show = ref(false);
582
- const showMore = ref(false);
583
- const moreList = [];
584
355
  return {
585
356
  show,
586
- showMore,
587
- moreList
588
357
  };
589
358
  },
590
359
  components: {
591
- ModalSearch,
592
360
  Close,
593
361
  CaretRight,
594
362
  CaretDown,
@@ -619,8 +387,6 @@ export default {
619
387
  data() {
620
388
  return {
621
389
  screen: null,
622
- topLevelIconsOnly: false,
623
- topLevelButtonIconsOnly: false,
624
390
  isMobileMenuOpen: false,
625
391
  isSecondLevelOpen: false,
626
392
  isThirdLevelOpen: false,
@@ -694,25 +460,10 @@ export default {
694
460
  this.isMobileMenuOpen = true
695
461
  }
696
462
  }
697
- // added code to check if val < 760, when top menu should revert to icons, not labels.
698
- if (val < 760) {
699
- this.topLevelIconsOnly = true
700
- } else {
701
- this.topLevelIconsOnly = false
702
- }
703
- if (val < 500) {
704
- this.topLevelButtonIconsOnly = true
705
- } else {
706
- this.topLevelButtonIconsOnly = false
707
- }
708
- this.updateMoreMenu(val)
709
463
  },
710
464
  },
711
465
  mounted() {
712
- this.$nextTick(() => {
713
- window.addEventListener('resize', this.updateMoreMenu())
714
- })
715
- this.updateMoreMenu()
466
+
716
467
  let selectedMode = document
717
468
  .getElementById('contrastStyle')
718
469
  ?.getAttribute('data-sel')
@@ -725,8 +476,7 @@ export default {
725
476
  window.removeEventListener('scroll', this.resetContrast)
726
477
  },
727
478
  destroyed() {
728
- window.removeEventListener('resize', this.screenWidth),
729
- window.removeEventListener('resize', this.updateMoreMenu)
479
+ window.removeEventListener('resize', this.screenWidth);
730
480
  },
731
481
  created() {
732
482
  if (typeof window !== 'undefined' && window) {
@@ -746,64 +496,29 @@ export default {
746
496
  screenWidth() {
747
497
  this.windowWidth = window.innerWidth;
748
498
  },
749
- updateMoreMenu(screenVal) {
750
- const nItems = document.getElementById('navitems')
751
- var scrollWidth = nItems?.scrollWidth
752
-
753
- if (scrollWidth > this.windowWidth) {
754
- scrollWidth = scrollWidth + this.addWidth
755
-
756
- while (scrollWidth > this.windowWidth) {
757
- if ( this.headerMenu.length > 1) { // check that there's more than one item in header
758
- var tempItem = this.headerMenu.pop()
759
- this.moreList.unshift(tempItem)
760
- scrollWidth = scrollWidth - tempItem.title.length
761
- } else {
762
- scrollWidth = this.windowWidth
763
- }
764
- }
765
- } else if ( this.moreList.length > 0 ) {
766
- let tempWidth = scrollWidth
767
- let ctr = 1
768
- while (ctr <= this.moreList.length) {
769
- var tempItem1 = this.moreList[0]
770
- tempWidth = tempWidth + tempItem1.title.length
771
- if (tempWidth > this.windoWidth) { //stop if newWidth would be greater than the windowWidth
772
- ctr = this.moreList.length
773
- } else { // move item fron dropdownArray to headerArray
774
- var tempItem2 = this.moreList.shift()
775
- this.headerMenu.push(tempItem2)
776
- scrollWidth = tempWidth
777
- }
778
- ctr++
779
- }
780
- }
781
- },
782
499
  firstLevelClick(item, ref) {
783
500
  // Reset screen to fix whitespace
784
- if (window && window.scrollTo && this.screen === 'desktop') {
785
- window.scrollTo(0, 0)
501
+ if (window && window.scrollTo && this.screen === "desktop") {
502
+ window.scrollTo(0, 0);
786
503
  }
787
504
 
788
- let selectedItem = this.$refs[ref][0]
789
- let previouslyOpenItem = this.getActiveParent()
505
+ let selectedItem = this.$refs[ref][0];
506
+ let previouslyOpenItem = this.getActiveParent();
790
507
 
791
508
  // Set this for mobile
792
- this.firstLevelItemName = item.title
793
- this.firstLevelItemRef = ref
794
-
509
+ this.firstLevelItemName = item.title;
510
+ this.firstLevelItemRef = ref;
511
+
795
512
  // Set the first item to the variable
796
513
  if (previouslyOpenItem.length) {
797
- previouslyOpenItem = previouslyOpenItem[0]
514
+ previouslyOpenItem = previouslyOpenItem[0];
798
515
  }
799
516
  // If the menu is not open, open it
800
517
  if (item.below && this.isSecondLevelOpen === false) {
801
- selectedItem.classList.add('isActiveParent')
802
- selectedItem
803
- .getElementsByTagName('a')[0]
804
- .setAttribute('aria-expanded', 'true')
805
- this.isSecondLevelOpen = true
806
- this.letBodyOverflow(false)
518
+ selectedItem.classList.add("isActiveParent");
519
+ selectedItem.getElementsByTagName("a")[0].setAttribute("aria-expanded", "true");
520
+ this.isSecondLevelOpen = true;
521
+ this.letBodyOverflow(false);
807
522
  }
808
523
  // If the menu is already open and the same item is clicked,
809
524
  // close it
@@ -812,33 +527,29 @@ export default {
812
527
  this.isSecondLevelOpen === true &&
813
528
  selectedItem === previouslyOpenItem
814
529
  ) {
815
- selectedItem.classList.remove('isActiveParent')
816
- selectedItem
817
- .getElementsByTagName('a')[0]
818
- .setAttribute('aria-expanded', 'false')
819
- this.isSecondLevelOpen = false
820
- this.letBodyOverflow(true)
530
+ selectedItem.classList.remove("isActiveParent");
531
+ selectedItem.getElementsByTagName("a")[0].setAttribute("aria-expanded", "false");
532
+ this.isSecondLevelOpen = false;
533
+ this.letBodyOverflow(true);
821
534
  }
822
535
  // If the link has no children then go to that page
823
536
  else if (!item.below) {
824
- if (item.relative !== '/') {
825
- this.$router.push(item.relative)
537
+ if (item.relative !== "/") {
538
+ this.$router.push(item.relative);
826
539
  }
827
540
  }
828
541
  // Otherwise just remove the existing open menu and add
829
542
  // the isActive class on the new selected item
830
543
  else {
831
- previouslyOpenItem.classList.remove('isActiveParent')
832
- selectedItem.classList.add('isActiveParent')
544
+ previouslyOpenItem.classList.remove("isActiveParent");
545
+ selectedItem.classList.add("isActiveParent");
833
546
  previouslyOpenItem
834
- .getElementsByTagName('a')[0]
835
- .setAttribute('aria-expanded', 'false')
836
- selectedItem
837
- .getElementsByTagName('a')[0]
838
- .setAttribute('aria-expanded', 'true')
547
+ .getElementsByTagName("a")[0]
548
+ .setAttribute("aria-expanded", "false");
549
+ selectedItem.getElementsByTagName("a")[0].setAttribute("aria-expanded", "true");
839
550
  }
840
- if (this.screen === 'mobile') {
841
- this.focusOnNext(selectedItem)
551
+ if (this.screen === "mobile") {
552
+ this.focusOnNext(selectedItem);
842
553
  }
843
554
  },
844
555
  secondLevelClick(item, ref) {
@@ -902,7 +613,6 @@ export default {
902
613
 
903
614
  this.isMobileMenuOpen = true
904
615
  this.letBodyOverflow(false)
905
- // this.showMore = false
906
616
  this.$nextTick(() => {
907
617
  this.$refs['firstLevelMenuItem-0'][0].firstElementChild.focus()
908
618
  })
@@ -1194,7 +904,8 @@ export default {
1194
904
  if (this.show) {
1195
905
  this.show = !this.show
1196
906
  }
1197
- }
907
+ },
908
+
1198
909
  },
1199
910
  }
1200
911
  </script>