Fix & Enhance accessibility

This commit is contained in:
Bubka
2024-11-21 16:02:02 +01:00
parent f6c090781e
commit d764d1c794
18 changed files with 171 additions and 63 deletions

View File

@ -24,6 +24,15 @@ export function useIdGenerator(fieldType, fieldName) {
case 'label':
prefix = 'lbl'
break
case 'select':
prefix = 'sel'
break
case 'legend':
prefix = 'leg'
break
case 'error':
prefix = 'err'
break
default:
prefix = 'txt'
break
@ -34,6 +43,12 @@ export function useIdGenerator(fieldType, fieldName) {
}
}
export function useValidationErrorIdGenerator(field) {
return {
valErrorId: 'valError' + field[0].toUpperCase() + field.toLowerCase().slice(1)
}
}
export function useDisplayablePassword(pwd, reveal = false) {
const user = useUserStore()