Refactor for accessibility
parent
5ed1341cff
commit
e2a631657b
|
@ -61,7 +61,6 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
id: UniqueComponentId(),
|
|
||||||
d_activeIndex: this.activeIndex
|
d_activeIndex: this.activeIndex
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -70,9 +69,6 @@ export default {
|
||||||
this.d_activeIndex = newValue;
|
this.d_activeIndex = newValue;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
|
||||||
this.id = this.$attrs.id || this.id;
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
isAccordionTab(child) {
|
isAccordionTab(child) {
|
||||||
return child.type.name === 'AccordionTab';
|
return child.type.name === 'AccordionTab';
|
||||||
|
@ -240,6 +236,9 @@ export default {
|
||||||
|
|
||||||
return tabs;
|
return tabs;
|
||||||
}, []);
|
}, []);
|
||||||
|
},
|
||||||
|
id() {
|
||||||
|
return this.$attrs.id || UniqueComponentId();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
directives: {
|
directives: {
|
||||||
|
|
|
@ -201,7 +201,6 @@ export default {
|
||||||
dirty: false,
|
dirty: false,
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
id: UniqueComponentId(),
|
|
||||||
focused: false,
|
focused: false,
|
||||||
focusedOptionIndex: -1,
|
focusedOptionIndex: -1,
|
||||||
focusedMultipleOptionIndex: -1,
|
focusedMultipleOptionIndex: -1,
|
||||||
|
@ -221,8 +220,6 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.id = this.$attrs.id || this.id;
|
|
||||||
|
|
||||||
this.autoUpdateModel();
|
this.autoUpdateModel();
|
||||||
},
|
},
|
||||||
updated() {
|
updated() {
|
||||||
|
@ -908,6 +905,9 @@ export default {
|
||||||
selectedMessageText() {
|
selectedMessageText() {
|
||||||
return this.hasSelectedOption ? this.selectionMessageText.replaceAll('{0}', this.multiple ? this.modelValue.length : '1') : this.emptySelectionMessageText;
|
return this.hasSelectedOption ? this.selectionMessageText.replaceAll('{0}', this.multiple ? this.modelValue.length : '1') : this.emptySelectionMessageText;
|
||||||
},
|
},
|
||||||
|
id() {
|
||||||
|
return this.$attrs.id || UniqueComponentId();
|
||||||
|
},
|
||||||
focusedOptionId() {
|
focusedOptionId() {
|
||||||
return this.focusedOptionIndex !== -1 ? `${this.id}_${this.focusedOptionIndex}` : null;
|
return this.focusedOptionIndex !== -1 ? `${this.id}_${this.focusedOptionIndex}` : null;
|
||||||
},
|
},
|
||||||
|
|
|
@ -129,7 +129,6 @@ export default {
|
||||||
focusOnHover: false,
|
focusOnHover: false,
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
id: UniqueComponentId(),
|
|
||||||
focused: false,
|
focused: false,
|
||||||
focusedOptionInfo: { index: -1, level: 0, parentKey: '' },
|
focusedOptionInfo: { index: -1, level: 0, parentKey: '' },
|
||||||
activeOptionPath: [],
|
activeOptionPath: [],
|
||||||
|
@ -143,8 +142,6 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.id = this.$attrs.id || this.id;
|
|
||||||
|
|
||||||
this.autoUpdateModel();
|
this.autoUpdateModel();
|
||||||
},
|
},
|
||||||
beforeUnmount() {
|
beforeUnmount() {
|
||||||
|
@ -760,6 +757,9 @@ export default {
|
||||||
selectedMessageText() {
|
selectedMessageText() {
|
||||||
return this.hasSelectedOption ? this.selectionMessageText.replaceAll('{0}', '1') : this.emptySelectionMessageText;
|
return this.hasSelectedOption ? this.selectionMessageText.replaceAll('{0}', '1') : this.emptySelectionMessageText;
|
||||||
},
|
},
|
||||||
|
id() {
|
||||||
|
return this.$attrs.id || UniqueComponentId();
|
||||||
|
},
|
||||||
focusedOptionId() {
|
focusedOptionId() {
|
||||||
return this.focusedOptionInfo.index !== -1 ? `${this.id}${ObjectUtils.isNotEmpty(this.focusedOptionInfo.parentKey) ? '_' + this.focusedOptionInfo.parentKey : ''}_${this.focusedOptionInfo.index}` : null;
|
return this.focusedOptionInfo.index !== -1 ? `${this.id}${ObjectUtils.isNotEmpty(this.focusedOptionInfo.parentKey) ? '_' + this.focusedOptionInfo.parentKey : ''}_${this.focusedOptionInfo.index}` : null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -197,7 +197,6 @@ export default {
|
||||||
focusOnHover: false,
|
focusOnHover: false,
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
id: UniqueComponentId(),
|
|
||||||
focused: false,
|
focused: false,
|
||||||
focusedOptionIndex: -1,
|
focusedOptionIndex: -1,
|
||||||
filterValue: null,
|
filterValue: null,
|
||||||
|
@ -213,8 +212,6 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.id = this.$attrs.id || this.id;
|
|
||||||
|
|
||||||
this.autoUpdateModel();
|
this.autoUpdateModel();
|
||||||
},
|
},
|
||||||
updated() {
|
updated() {
|
||||||
|
@ -874,6 +871,9 @@ export default {
|
||||||
selectedMessageText() {
|
selectedMessageText() {
|
||||||
return this.hasSelectedOption ? this.selectionMessageText.replaceAll('{0}', '1') : this.emptySelectionMessageText;
|
return this.hasSelectedOption ? this.selectionMessageText.replaceAll('{0}', '1') : this.emptySelectionMessageText;
|
||||||
},
|
},
|
||||||
|
id() {
|
||||||
|
return this.$attrs.id || UniqueComponentId();
|
||||||
|
},
|
||||||
focusedOptionId() {
|
focusedOptionId() {
|
||||||
return this.focusedOptionIndex !== -1 ? `${this.id}_${this.focusedOptionIndex}` : null;
|
return this.focusedOptionIndex !== -1 ? `${this.id}_${this.focusedOptionIndex}` : null;
|
||||||
},
|
},
|
||||||
|
|
|
@ -142,7 +142,6 @@ export default {
|
||||||
focusOnHover: false,
|
focusOnHover: false,
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
id: UniqueComponentId(),
|
|
||||||
filterValue: null,
|
filterValue: null,
|
||||||
focused: false,
|
focused: false,
|
||||||
focusedOptionIndex: -1
|
focusedOptionIndex: -1
|
||||||
|
@ -154,8 +153,6 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.id = this.$attrs.id || this.id;
|
|
||||||
|
|
||||||
this.autoUpdateModel();
|
this.autoUpdateModel();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -685,6 +682,9 @@ export default {
|
||||||
selectedMessageText() {
|
selectedMessageText() {
|
||||||
return this.hasSelectedOption ? this.selectionMessageText.replaceAll('{0}', this.multiple ? this.modelValue.length : '1') : this.emptySelectionMessageText;
|
return this.hasSelectedOption ? this.selectionMessageText.replaceAll('{0}', this.multiple ? this.modelValue.length : '1') : this.emptySelectionMessageText;
|
||||||
},
|
},
|
||||||
|
id() {
|
||||||
|
return this.$attrs.id || UniqueComponentId();
|
||||||
|
},
|
||||||
focusedOptionId() {
|
focusedOptionId() {
|
||||||
return this.focusedOptionIndex !== -1 ? `${this.id}_${this.focusedOptionIndex}` : null;
|
return this.focusedOptionIndex !== -1 ? `${this.id}_${this.focusedOptionIndex}` : null;
|
||||||
},
|
},
|
||||||
|
|
|
@ -247,7 +247,6 @@ export default {
|
||||||
focusOnHover: false,
|
focusOnHover: false,
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
id: UniqueComponentId(),
|
|
||||||
focused: false,
|
focused: false,
|
||||||
focusedOptionIndex: -1,
|
focusedOptionIndex: -1,
|
||||||
headerCheckboxFocused: false,
|
headerCheckboxFocused: false,
|
||||||
|
@ -261,8 +260,6 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.id = this.$attrs.id || this.id;
|
|
||||||
|
|
||||||
this.autoUpdateModel();
|
this.autoUpdateModel();
|
||||||
},
|
},
|
||||||
beforeUnmount() {
|
beforeUnmount() {
|
||||||
|
@ -1027,6 +1024,9 @@ export default {
|
||||||
selectedMessageText() {
|
selectedMessageText() {
|
||||||
return this.hasSelectedOption ? this.selectionMessageText.replaceAll('{0}', this.modelValue.length) : this.emptySelectionMessageText;
|
return this.hasSelectedOption ? this.selectionMessageText.replaceAll('{0}', this.modelValue.length) : this.emptySelectionMessageText;
|
||||||
},
|
},
|
||||||
|
id() {
|
||||||
|
return this.$attrs.id || UniqueComponentId();
|
||||||
|
},
|
||||||
focusedOptionId() {
|
focusedOptionId() {
|
||||||
return this.focusedOptionIndex !== -1 ? `${this.id}_${this.focusedOptionIndex}` : null;
|
return this.focusedOptionIndex !== -1 ? `${this.id}_${this.focusedOptionIndex}` : null;
|
||||||
},
|
},
|
||||||
|
|
|
@ -67,7 +67,6 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
id: UniqueComponentId(),
|
|
||||||
d_activeIndex: this.activeIndex,
|
d_activeIndex: this.activeIndex,
|
||||||
focusedTabIndex: -1,
|
focusedTabIndex: -1,
|
||||||
isPrevButtonDisabled: true,
|
isPrevButtonDisabled: true,
|
||||||
|
@ -82,8 +81,6 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.id = this.$attrs.id || this.id;
|
|
||||||
|
|
||||||
this.updateInkBar();
|
this.updateInkBar();
|
||||||
},
|
},
|
||||||
updated() {
|
updated() {
|
||||||
|
@ -304,6 +301,9 @@ export default {
|
||||||
},
|
},
|
||||||
nextButtonAriaLabel() {
|
nextButtonAriaLabel() {
|
||||||
return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.next : undefined;
|
return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.next : undefined;
|
||||||
|
},
|
||||||
|
id() {
|
||||||
|
return this.$attrs.id || UniqueComponentId();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
directives: {
|
directives: {
|
||||||
|
|
Loading…
Reference in New Issue