aloha-vue 1.2.4 → 1.2.5

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.
@@ -7,6 +7,7 @@ import PageWizardButtons from "./PageWizardButtons/PageWizardButtons.vue";
7
7
  import PageWizardButtonsDisabled from "./PageWizardButtonsDisabled/PageWizardButtonsDisabled.vue";
8
8
  import PageWizardButtonsHide from "./PageWizardButtonsHide/PageWizardButtonsHide.vue";
9
9
  import PageWizardDemo from "./PageWizardDemo/PageWizardDemo.vue";
10
+ import PageWizardHasFocusJump from "./PageWizardHasFocusJump/PageWizardHasFocusJump.vue";
10
11
  import PageWizardIsButtonsLoading from "./PageWizardIsButtonsLoading/PageWizardIsButtonsLoading.vue";
11
12
  import PageWizardIsControlOutside from "./PageWizardIsControlOutside/PageWizardIsControlOutside.vue";
12
13
  import PageWizardIsStepNumberVisible from "./PageWizardIsStepNumberVisible/PageWizardIsStepNumberVisible.vue";
@@ -40,6 +41,7 @@ export default {
40
41
  PageWizardButtonsDisabled,
41
42
  PageWizardButtonsHide,
42
43
  PageWizardDemo,
44
+ PageWizardHasFocusJump,
43
45
  PageWizardIsButtonsLoading,
44
46
  PageWizardIsControlOutside,
45
47
  PageWizardIsStepNumberVisible,
@@ -35,6 +35,8 @@ aloha-page(
35
35
 
36
36
  page-wizard-key-id
37
37
 
38
+ page-wizard-has-focus-jump
39
+
38
40
  page-wizard-is-control-outside
39
41
 
40
42
  page-wizard-slot-toolbar
@@ -0,0 +1,66 @@
1
+ import {
2
+ ref,
3
+ } from "vue";
4
+
5
+ import AlohaExample from "../../../global/components/AlohaExample/AlohaExample.vue";
6
+ import ASwitch from "../../../../../src/ui/ASwitch/ASwitch";
7
+ import ATranslation from "../../../../../src/ATranslation/ATranslation";
8
+ import AWizard from "../../../../../src/AWizard/AWizard";
9
+
10
+ import HtmlAPI from "./compositionAPI/HtmlAPI";
11
+ import JsAPI from "./compositionAPI/JsAPI";
12
+
13
+ export default {
14
+ name: "PageWizardHasFocusJump",
15
+ components: {
16
+ AlohaExample,
17
+ ASwitch,
18
+ ATranslation,
19
+ AWizard,
20
+ },
21
+ setup() {
22
+ const {
23
+ codeHtml,
24
+ } = HtmlAPI();
25
+
26
+ const {
27
+ codeJs,
28
+ } = JsAPI();
29
+
30
+ const hasFocusJump = ref(false);
31
+ const wizardSteps = [
32
+ {
33
+ slot: "step1",
34
+ label: "_A_WIZARD_STEP_1_",
35
+ title: "_A_WIZARD_STEP_1_",
36
+ },
37
+ {
38
+ slot: "step2",
39
+ label: "_A_WIZARD_STEP_2_",
40
+ title: "_A_WIZARD_STEP_2_",
41
+ },
42
+ {
43
+ slot: "step3",
44
+ label: "_A_WIZARD_STEP_3_",
45
+ title: "_A_WIZARD_STEP_3_",
46
+ },
47
+ {
48
+ slot: "step4",
49
+ label: "_A_WIZARD_STEP_4_",
50
+ title: "_A_WIZARD_STEP_4_",
51
+ },
52
+ ];
53
+ const text = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque nisl eros,
54
+ pulvinar facilisis justo mollis, auctor consequat urna. Morbi a bibendum metus.
55
+ Donec scelerisque sollicitudin enim eu venenatis. Duis tincidunt laoreet ex,
56
+ in pretium orci vestibulum eget. Class aptent taciti sociosqu ad litora torquent`;
57
+
58
+ return {
59
+ codeHtml,
60
+ codeJs,
61
+ hasFocusJump,
62
+ text,
63
+ wizardSteps,
64
+ };
65
+ },
66
+ };
@@ -0,0 +1,52 @@
1
+ aloha-example(
2
+ :code-html="codeHtml"
3
+ :code-js="codeJs"
4
+ header="_A_WIZARD_GROUP_HAS_FOCUS_JUMP_HEADER_"
5
+ description="_A_WIZARD_GROUP_HAS_FOCUS_JUMP_DESCRIPTION_"
6
+ :props="['has-focus-jump']"
7
+ )
8
+ .a_columns.a_columns_count_12
9
+ .a_column.a_column_6.a_columns_count_12_touch.a_mb_5
10
+ a-switch(
11
+ v-model="hasFocusJump"
12
+ label="has-focus-jump"
13
+ )
14
+ a-wizard(
15
+ :steps="wizardSteps"
16
+ :has-focus-jump="hasFocusJump"
17
+ )
18
+ template(
19
+ v-slot:step1
20
+ )
21
+ a-translation(
22
+ tag="h2"
23
+ text="_A_WIZARD_STEP_1_"
24
+ )
25
+ p {{ text }}
26
+
27
+ template(
28
+ v-slot:step2
29
+ )
30
+ a-translation(
31
+ tag="h2"
32
+ text="_A_WIZARD_STEP_2_"
33
+ )
34
+ p {{ text }}
35
+
36
+ template(
37
+ v-slot:step3
38
+ )
39
+ a-translation(
40
+ tag="h2"
41
+ text="_A_WIZARD_STEP_3_"
42
+ )
43
+ p {{ text }}
44
+
45
+ template(
46
+ v-slot:step4
47
+ )
48
+ a-translation(
49
+ tag="h2"
50
+ text="_A_WIZARD_STEP_4_"
51
+ )
52
+ p {{ text }}
@@ -0,0 +1,2 @@
1
+ <template lang="pug" src="./PageWizardHasFocusJump.pug"></template>
2
+ <script src="./PageWizardHasFocusJump.js"></script>
@@ -0,0 +1,59 @@
1
+ export default function HtmlAPI() {
2
+ const codeHtml = `<div
3
+ class="a_columns a_columns_count_12"
4
+ >
5
+ <div
6
+ class="a_column.a_column_6 a_columns_count_12_touch a_mb_5"
7
+ >
8
+ <a-switch
9
+ v-model="hasFocusJump"
10
+ label="has-focus-jump"
11
+ ></a-switch>
12
+ </div>
13
+ </div>
14
+ <a-wizard
15
+ :steps="wizardSteps"
16
+ :has-focus-jump="hasFocusJump"
17
+ >
18
+ <template
19
+ v-slot:step1
20
+ >
21
+ <a-translation
22
+ tag="h2"
23
+ text="_A_MODAL_WIZARD_STEP_1_"
24
+ ></a-translation>
25
+ <p>{{ text }}</p>
26
+ </template>
27
+ <template
28
+ v-slot:step2
29
+ >
30
+ <a-translation
31
+ tag="h2"
32
+ text="_A_MODAL_WIZARD_STEP_2_"
33
+ ></a-translation>
34
+ <p>{{ text }}</p>
35
+ </template>
36
+ <template
37
+ v-slot:step3
38
+ >
39
+ <a-translation
40
+ tag="h2"
41
+ text="_A_MODAL_WIZARD_STEP_3_"
42
+ ></a-translation>
43
+ <p>{{ text }}</p>
44
+ </template>
45
+ <template
46
+ v-slot:step4
47
+ >
48
+ <a-translation
49
+ tag="h2"
50
+ text="_A_MODAL_WIZARD_STEP_4_"
51
+ ></a-translation>
52
+ <p>{{ text }}</p>
53
+ </template>
54
+ </a-wizard>`;
55
+
56
+ return {
57
+ codeHtml,
58
+ };
59
+ }
@@ -0,0 +1,57 @@
1
+ export default function JsAPI() {
2
+ const codeJs = `import {
3
+ ref,
4
+ } from "vue";
5
+
6
+ import ASwitch from "aloha-vue/src/ui/ASwitch/ASwitch";
7
+ import ATranslation from "aloha-vue/src/ATranslation/ATranslation";
8
+ import AWizard from "aloha-vue/src/AWizard/AWizard";
9
+
10
+ export default {
11
+ name: "PageWizardHasFocusJump",
12
+ components: {
13
+ ASwitch,
14
+ ATranslation,
15
+ AWizard,
16
+ },
17
+ setup() {
18
+ const hasFocusJump = ref(false);
19
+ const wizardSteps = [
20
+ {
21
+ slot: "step1",
22
+ label: "_A_MODAL_WIZARD_STEP_1_",
23
+ title: "_A_MODAL_WIZARD_STEP_1_",
24
+ },
25
+ {
26
+ slot: "step2",
27
+ label: "_A_MODAL_WIZARD_STEP_2_",
28
+ title: "_A_MODAL_WIZARD_STEP_2_",
29
+ },
30
+ {
31
+ slot: "step3",
32
+ label: "_A_MODAL_WIZARD_STEP_3_",
33
+ title: "_A_MODAL_WIZARD_STEP_3_",
34
+ },
35
+ {
36
+ slot: "step4",
37
+ label: "_A_MODAL_WIZARD_STEP_4_",
38
+ title: "_A_MODAL_WIZARD_STEP_4_",
39
+ },
40
+ ];
41
+ const text = \`Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque nisl eros,
42
+ pulvinar facilisis justo mollis, auctor consequat urna. Morbi a bibendum metus.
43
+ Donec scelerisque sollicitudin enim eu venenatis. Duis tincidunt laoreet ex,
44
+ in pretium orci vestibulum eget. Class aptent taciti sociosqu ad litora torquent\`;
45
+
46
+ return {
47
+ hasFocusJump,
48
+ text,
49
+ wizardSteps,
50
+ };
51
+ },
52
+ };`;
53
+
54
+ return {
55
+ codeJs,
56
+ };
57
+ }
@@ -91,6 +91,20 @@ export default function PropsAPI() {
91
91
  default: undefined,
92
92
  required: false,
93
93
  },
94
+ {
95
+ name: "has-focus-jump",
96
+ description: "_A_WIZARD_PROPS_HAS_FOCUS_JUMP_DESCRIPTION_",
97
+ type: "Boolean",
98
+ default: true,
99
+ required: false,
100
+ },
101
+ {
102
+ name: "id",
103
+ description: "_A_WIZARD_PROPS_ID_DESCRIPTION_",
104
+ type: "String",
105
+ default: "() => uniqueId(\"a_wizard_\")",
106
+ required: false,
107
+ },
94
108
  {
95
109
  name: "is-back-button-disabled",
96
110
  description: "_A_WIZARD_PROPS_IS_BACK_BUTTON_DISABLED_DESCRIPTION_",
@@ -1,5 +1,6 @@
1
1
  export default function TranslateAPI() {
2
2
  const dataTranslate = [
3
+ "_A_WIZARD_HEADER_STEP_SCREEN_READER_{{stepNumber}}_",
3
4
  "_A_WIZARD_NEXT_",
4
5
  "_A_WIZARD_PREVIOUS_",
5
6
  "_A_WIZARD_STEPS_PROGRESSBAR_TEXT_{{stepActive}}_{{stepsCount}}_{{stepActiveLabel}}_",
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "Vue.js"
15
15
  ],
16
16
  "homepage": "https://github.com/ilia-brykin/aloha/#README.md",
17
- "version": "1.2.4",
17
+ "version": "1.2.5",
18
18
  "author": {
19
19
  "name": "Ilia Brykin",
20
20
  "email": "brykin.ilia@gmail.com"
@@ -14,6 +14,10 @@ import LocalAPI from "./compositionAPI/LocalAPI";
14
14
  import StepsAPI from "./compositionAPI/StepsAPI";
15
15
  import TeleportAPI from "./compositionAPI/TeleportAPI";
16
16
 
17
+ import {
18
+ uniqueId,
19
+ } from "lodash-es";
20
+
17
21
  export default {
18
22
  name: "AWizard",
19
23
  props: {
@@ -82,6 +86,16 @@ export default {
82
86
  required: false,
83
87
  default: undefined,
84
88
  },
89
+ hasFocusJump: {
90
+ type: Boolean,
91
+ required: false,
92
+ default: true,
93
+ },
94
+ id: {
95
+ type: String,
96
+ required: false,
97
+ default: () => uniqueId("a_wizard_"),
98
+ },
85
99
  isBackButtonDisabled: {
86
100
  type: Boolean,
87
101
  required: false,
@@ -193,13 +207,20 @@ export default {
193
207
  classWizard,
194
208
  } = ClassAPI(props);
195
209
 
210
+ const {
211
+ setFocusToActiveStep,
212
+ wizardTabsRef,
213
+ } = FocusAPI(props);
214
+
196
215
  const {
197
216
  initStepActive,
198
217
  stepActiveComputed,
199
218
  stepActiveLocal,
200
219
  stepsVisitedComputed,
201
220
  stepsVisitedLocal,
202
- } = LocalAPI(props);
221
+ } = LocalAPI(props, {
222
+ setFocusToActiveStep,
223
+ });
203
224
 
204
225
  const {
205
226
  goOneStepBack,
@@ -211,12 +232,6 @@ export default {
211
232
  stepsVisitedLocal,
212
233
  });
213
234
 
214
- const {
215
- tabContentRef,
216
- } = FocusAPI({
217
- stepActiveComputed,
218
- });
219
-
220
235
  const {
221
236
  stepActiveNumber,
222
237
  stepsCount,
@@ -242,9 +257,9 @@ export default {
242
257
  stepsCount,
243
258
  stepsProgressbarTextTranslated,
244
259
  stepsVisitedComputed,
245
- tabContentRef,
246
260
  toolbarBottomTeleportSelector,
247
261
  useTeleportToolbarBottom,
262
+ wizardTabsRef,
248
263
  };
249
264
  },
250
265
  render() {
@@ -276,7 +291,9 @@ export default {
276
291
  }, this.$slots);
277
292
 
278
293
  return h("div", {
294
+ id: this.id,
279
295
  class: this.classWizard,
296
+ role: "application",
280
297
  }, [
281
298
  h("ul", {
282
299
  class: "a_wizard__steps",
@@ -290,6 +307,7 @@ export default {
290
307
  this.steps.map((step, stepIndex) => {
291
308
  return h(AWizardStep, {
292
309
  key: this.keyId ? step[this.keyId] : stepIndex,
310
+ id: this.id,
293
311
  step,
294
312
  stepIndex,
295
313
  stepActiveComputed: this.stepActiveComputed,
@@ -305,12 +323,13 @@ export default {
305
323
  ]),
306
324
  this.isToolbarTop && TOOLBAR,
307
325
  h("div", {
308
- ref: "tabContentRef",
309
326
  class: "a_wizard__tab_content",
310
- tabindex: -1,
311
327
  }, [
312
328
  this.steps.map((step, stepIndex) => {
313
329
  return h(AWizardTab, {
330
+ key: this.keyId ? step[this.keyId] : stepIndex,
331
+ id: this.id,
332
+ extra: this.extra,
314
333
  step,
315
334
  stepIndex,
316
335
  stepActiveComputed: this.stepActiveComputed,
@@ -6,6 +6,7 @@ import ATranslation from "../../ATranslation/ATranslation";
6
6
 
7
7
  import ActiveAPI from "./compositionAPI/ActiveAPI";
8
8
  import AttributesAPI from "./compositionAPI/AttributesAPI";
9
+ import ContentIdAPI from "../AWizardTab/compositionAPI/ContentIdAPI";
9
10
  import DisabledAPI from "./compositionAPI/DisabledAPI";
10
11
  import EventsAPI from "./compositionAPI/EventsAPI";
11
12
  import LinkClassAPI from "./compositionAPI/LinkClassAPI";
@@ -14,43 +15,47 @@ import NumberAPI from "./compositionAPI/NumberAPI";
14
15
  export default {
15
16
  name: "AWizardStep",
16
17
  props: {
17
- step: {
18
+ extra: {
18
19
  type: Object,
19
20
  required: true,
20
21
  },
21
- stepIndex: {
22
- type: Number,
22
+ id: {
23
+ type: String,
23
24
  required: true,
24
25
  },
25
- stepActiveComputed: {
26
- type: Number,
27
- required: false,
28
- default: 0,
29
- },
30
- isStepNumberVisible: {
26
+ isBackButtonDisabled: {
31
27
  type: Boolean,
32
28
  required: true,
33
29
  },
34
- isForwardStepButtonDisabled: {
30
+ isBackStepButtonDisabled: {
35
31
  type: Boolean,
36
32
  required: true,
37
33
  },
38
- isBackStepButtonDisabled: {
34
+ isForwardButtonDisabled: {
39
35
  type: Boolean,
40
36
  required: true,
41
37
  },
42
- isForwardButtonDisabled: {
38
+ isForwardStepButtonDisabled: {
43
39
  type: Boolean,
44
40
  required: true,
45
41
  },
46
- isBackButtonDisabled: {
42
+ isStepNumberVisible: {
47
43
  type: Boolean,
48
44
  required: true,
49
45
  },
50
- extra: {
46
+ step: {
51
47
  type: Object,
52
48
  required: true,
53
49
  },
50
+ stepActiveComputed: {
51
+ type: Number,
52
+ required: false,
53
+ default: 0,
54
+ },
55
+ stepIndex: {
56
+ type: Number,
57
+ required: true,
58
+ },
54
59
  },
55
60
  emits: [
56
61
  "onStepClick",
@@ -91,8 +96,13 @@ export default {
91
96
  isStepActive,
92
97
  });
93
98
 
99
+ const {
100
+ contentId,
101
+ } = ContentIdAPI(props);
102
+
94
103
  return {
95
104
  ariaCurrentAttributes,
105
+ contentId,
96
106
  isStepActive,
97
107
  isStepDisabled,
98
108
  linkClass,
@@ -108,6 +118,7 @@ export default {
108
118
  "li",
109
119
  {
110
120
  class: "a_wizard__step",
121
+ role: "presentation",
111
122
  },
112
123
  [
113
124
  h("a", {
@@ -115,6 +126,7 @@ export default {
115
126
  role: "button",
116
127
  tabindex: this.tabindex,
117
128
  ariaDisabled: this.isStepDisabled,
129
+ "aria-controls": this.contentId,
118
130
  onClick: this.onClick,
119
131
  onKeydown: this.onKeydown,
120
132
  ...this.ariaCurrentAttributes,
@@ -2,12 +2,24 @@ import {
2
2
  h,
3
3
  } from "vue";
4
4
 
5
+ import ATranslation from "../../ATranslation/ATranslation";
6
+
5
7
  import ActiveAPI from "./compositionAPI/ActiveAPI";
8
+ import FocusIdAPI from "./compositionAPI/FocusIdAPI";
6
9
  import VisibilityAPI from "./compositionAPI/VisibilityAPI";
10
+ import ContentIdAPI from "./compositionAPI/ContentIdAPI";
7
11
 
8
12
  export default {
9
13
  name: "AWizardTab",
10
14
  props: {
15
+ id: {
16
+ type: String,
17
+ required: true,
18
+ },
19
+ extra: {
20
+ type: Object,
21
+ required: true,
22
+ },
11
23
  step: {
12
24
  type: Object,
13
25
  required: true,
@@ -39,20 +51,54 @@ export default {
39
51
  isStepActive,
40
52
  });
41
53
 
54
+ const {
55
+ focusId,
56
+ } = FocusIdAPI(props);
57
+
58
+ const {
59
+ contentId,
60
+ } = ContentIdAPI(props);
61
+
42
62
  return {
63
+ contentId,
64
+ focusId,
43
65
  isStepRender,
44
66
  styleStep,
45
67
  };
46
68
  },
47
69
  render() {
48
- return this.isStepRender && h("div", {
49
- class: "a_wizard__tab_pane",
50
- style: this.styleStep,
70
+ return h("div", {
71
+ id: this.contentId,
51
72
  }, [
52
- this.$slots[this.step.slot] && this.$slots[this.step.slot]({
53
- step: this.step,
54
- stepIndex: this.stepIndex,
55
- }),
73
+ this.isStepRender && h("div", {
74
+ class: "a_wizard__tab_pane",
75
+ style: this.styleStep,
76
+ }, [
77
+ h("div", {
78
+ id: this.focusId,
79
+ class: "a_sr_only",
80
+ tabindex: "-1",
81
+ }, [
82
+ h(ATranslation, {
83
+ tag: "span",
84
+ text: "_A_WIZARD_HEADER_STEP_SCREEN_READER_{{stepNumber}}_",
85
+ extra: {
86
+ stepNumber: this.stepIndex + 1,
87
+ },
88
+ }),
89
+ (!this.step.slotLabel || this.$slots[this.step.slotLabel]) &&
90
+ h(ATranslation, {
91
+ tag: "span",
92
+ html: this.step.label,
93
+ class: "a_wizard__step__text",
94
+ extra: this.extra,
95
+ }),
96
+ ]),
97
+ this.$slots[this.step.slot] && this.$slots[this.step.slot]({
98
+ step: this.step,
99
+ stepIndex: this.stepIndex,
100
+ }),
101
+ ]),
56
102
  ]);
57
103
  },
58
104
  };
@@ -0,0 +1,17 @@
1
+ import {
2
+ computed,
3
+ toRef,
4
+ } from "vue";
5
+
6
+ export default function ContentIdAPI(props) {
7
+ const id = toRef(props, "id");
8
+ const stepIndex = toRef(props, "stepIndex");
9
+
10
+ const contentId = computed(() => {
11
+ return `${ id.value }_${ stepIndex.value }_content`;
12
+ });
13
+
14
+ return {
15
+ contentId,
16
+ };
17
+ }
@@ -0,0 +1,17 @@
1
+ import {
2
+ computed,
3
+ toRef,
4
+ } from "vue";
5
+
6
+ export default function FocusIdAPI(props) {
7
+ const id = toRef(props, "id");
8
+ const stepIndex = toRef(props, "stepIndex");
9
+
10
+ const focusId = computed(() => {
11
+ return `${ id.value }_${ stepIndex.value }_focus`;
12
+ });
13
+
14
+ return {
15
+ focusId,
16
+ };
17
+ }
@@ -1,20 +1,31 @@
1
1
  import {
2
2
  ref,
3
- watch,
3
+ toRef,
4
4
  } from "vue";
5
5
 
6
- export default function FocusAPI({
7
- stepActiveComputed,
8
- }) {
9
- const tabContentRef = ref(undefined);
6
+ import {
7
+ setFocusToElement,
8
+ } from "../../utils/utilsDOM";
9
+
10
+ export default function FocusAPI(props) {
11
+ const hasFocusJump = toRef(props, "hasFocusJump");
12
+ const id = toRef(props, "id");
10
13
 
11
- watch(stepActiveComputed, () => {
12
- setTimeout(() => {
13
- tabContentRef.value && tabContentRef.value.focus();
14
- });
15
- });
14
+ const wizardTabsRef = ref([]);
15
+
16
+ const setFocusToActiveStep = ({ stepActive }) => {
17
+ if (hasFocusJump.value) {
18
+ setTimeout(() => {
19
+ const FOCUS_ID_SELECTOR = `#${ id.value }_${ stepActive }_focus`;
20
+ setFocusToElement({
21
+ selector: FOCUS_ID_SELECTOR,
22
+ });
23
+ });
24
+ }
25
+ };
16
26
 
17
27
  return {
18
- tabContentRef,
28
+ setFocusToActiveStep,
29
+ wizardTabsRef,
19
30
  };
20
31
  }
@@ -2,17 +2,21 @@ import {
2
2
  computed,
3
3
  ref,
4
4
  toRef,
5
+ watch,
5
6
  } from "vue";
6
7
 
7
8
  import {
8
9
  isNil,
9
10
  } from "lodash-es";
10
11
 
11
- export default function LocalAPI(props) {
12
+ export default function LocalAPI(props, {
13
+ setFocusToActiveStep = () => {},
14
+ }) {
12
15
  const stepActive = toRef(props, "stepActive");
13
16
  const stepsVisited = toRef(props, "stepsVisited");
14
17
  const isControlOutside = toRef(props, "isControlOutside");
15
18
 
19
+ const isWatchActive = ref(false);
16
20
  const stepActiveLocal = ref(0);
17
21
  const stepsVisitedLocal = ref({
18
22
  0: true,
@@ -27,17 +31,25 @@ export default function LocalAPI(props) {
27
31
  });
28
32
 
29
33
  const initStepActive = () => {
30
- if (isControlOutside.value) {
31
- return;
32
- }
33
- if (!isNil(stepActive.value)) {
34
- stepActiveLocal.value = stepActive.value;
35
- stepsVisitedLocal.value = {
36
- [stepActive.value]: true,
37
- };
34
+ if (!isControlOutside.value) {
35
+ if (!isNil(stepActive.value)) {
36
+ stepActiveLocal.value = stepActive.value;
37
+ stepsVisitedLocal.value = {
38
+ [stepActive.value]: true,
39
+ };
40
+ }
38
41
  }
42
+ setTimeout(() => {
43
+ isWatchActive.value = true;
44
+ });
39
45
  };
40
46
 
47
+ watch(stepActiveComputed, newValue => {
48
+ if (isWatchActive.value) {
49
+ setFocusToActiveStep({ stepActive: newValue });
50
+ }
51
+ });
52
+
41
53
  return {
42
54
  initStepActive,
43
55
  stepActiveComputed,
@@ -1,4 +1,5 @@
1
1
  {
2
+ "_A_WIZARD_HEADER_STEP_SCREEN_READER_{{stepNumber}}_": "_A_WIZARD_HEADER_STEP_SCREEN_READER_{{stepNumber}}_",
2
3
  "_A_WIZARD_NEXT_": "التالي",
3
4
  "_A_WIZARD_PREVIOUS_": "سابق",
4
5
  "_A_WIZARD_STEPS_PROGRESSBAR_TEXT_{{stepActive}}_{{stepsCount}}_{{stepActiveLabel}}_": "{{ stepActiveLabel }}: {{ stepsCount }} من {{ stepActive }} خطوة"
@@ -1,4 +1,5 @@
1
1
  {
2
+ "_A_WIZARD_HEADER_STEP_SCREEN_READER_{{stepNumber}}_": "Schritt {{ stepNumber }}:",
2
3
  "_A_WIZARD_NEXT_": "Nächste",
3
4
  "_A_WIZARD_PREVIOUS_": "Vorherige",
4
5
  "_A_WIZARD_STEPS_PROGRESSBAR_TEXT_{{stepActive}}_{{stepsCount}}_{{stepActiveLabel}}_": "Schritt {{ stepActive }} von {{ stepsCount }}: {{ stepActiveLabel }}"
@@ -1,4 +1,5 @@
1
1
  {
2
+ "_A_WIZARD_HEADER_STEP_SCREEN_READER_{{stepNumber}}_": "Step {{ stepNumber }}:",
2
3
  "_A_WIZARD_NEXT_": "Next",
3
4
  "_A_WIZARD_PREVIOUS_": "Previous",
4
5
  "_A_WIZARD_STEPS_PROGRESSBAR_TEXT_{{stepActive}}_{{stepsCount}}_{{stepActiveLabel}}_": "Step {{ stepActive }} of {{ stepsCount }}: {{ stepActiveLabel }}"
@@ -1,4 +1,5 @@
1
1
  {
2
+ "_A_WIZARD_HEADER_STEP_SCREEN_READER_{{stepNumber}}_": "_A_WIZARD_HEADER_STEP_SCREEN_READER_{{stepNumber}}_",
2
3
  "_A_WIZARD_NEXT_": "Próximo",
3
4
  "_A_WIZARD_PREVIOUS_": "Previo",
4
5
  "_A_WIZARD_STEPS_PROGRESSBAR_TEXT_{{stepActive}}_{{stepsCount}}_{{stepActiveLabel}}_": "escenario {{ stepActive }} de {{ stepsCount }}: {{ stepActiveLabel }}"
@@ -1,4 +1,5 @@
1
1
  {
2
+ "_A_WIZARD_HEADER_STEP_SCREEN_READER_{{stepNumber}}_": "_A_WIZARD_HEADER_STEP_SCREEN_READER_{{stepNumber}}_",
2
3
  "_A_WIZARD_NEXT_": "Suivant",
3
4
  "_A_WIZARD_PREVIOUS_": "Précédent",
4
5
  "_A_WIZARD_STEPS_PROGRESSBAR_TEXT_{{stepActive}}_{{stepsCount}}_{{stepActiveLabel}}_": "Etape {{ stepActive }} de {{ stepsCount }}: {{ stepActiveLabel }}"
@@ -1,4 +1,5 @@
1
1
  {
2
+ "_A_WIZARD_HEADER_STEP_SCREEN_READER_{{stepNumber}}_": "_A_WIZARD_HEADER_STEP_SCREEN_READER_{{stepNumber}}_",
2
3
  "_A_WIZARD_NEXT_": "Dalje",
3
4
  "_A_WIZARD_PREVIOUS_": "Natrag",
4
5
  "_A_WIZARD_STEPS_PROGRESSBAR_TEXT_{{stepActive}}_{{stepsCount}}_{{stepActiveLabel}}_": "Korak {{ stepActive }} od {{ stepsCount }}: {{ stepActiveLabel }}"
@@ -1,4 +1,5 @@
1
1
  {
2
+ "_A_WIZARD_HEADER_STEP_SCREEN_READER_{{stepNumber}}_": "_A_WIZARD_HEADER_STEP_SCREEN_READER_{{stepNumber}}_",
2
3
  "_A_WIZARD_NEXT_": "Prossimo",
3
4
  "_A_WIZARD_PREVIOUS_": "Precedente",
4
5
  "_A_WIZARD_STEPS_PROGRESSBAR_TEXT_{{stepActive}}_{{stepsCount}}_{{stepActiveLabel}}_": "palcoscenico {{ stepActive }} Di {{ stepsCount }}: {{ stepActiveLabel }}"
@@ -1,4 +1,5 @@
1
1
  {
2
+ "_A_WIZARD_HEADER_STEP_SCREEN_READER_{{stepNumber}}_": "Шаг {{ stepNumber }}:",
2
3
  "_A_WIZARD_NEXT_": "Следующий",
3
4
  "_A_WIZARD_PREVIOUS_": "Предыдущий",
4
5
  "_A_WIZARD_STEPS_PROGRESSBAR_TEXT_{{stepActive}}_{{stepsCount}}_{{stepActiveLabel}}_": "Шаг {{ stepActive }} из {{ stepsCount }}: {{ stepActiveLabel }}"