mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-22 07:50:36 +01:00
feat(FormField): set aria-describedby and aria-invalid attributes (#3123)
This commit is contained in:
@@ -66,7 +66,7 @@ const emits = defineEmits<TextareaEmits>()
|
||||
|
||||
const [modelValue, modelModifiers] = defineModel<string | number>()
|
||||
|
||||
const { emitFormBlur, emitFormInput, emitFormChange, size, color, id, name, highlight, disabled } = useFormField<TextareaProps>(props, { deferInputValidation: true })
|
||||
const { emitFormBlur, emitFormInput, emitFormChange, size, color, id, name, highlight, disabled, ariaAttrs } = useFormField<TextareaProps>(props, { deferInputValidation: true })
|
||||
|
||||
const ui = computed(() => textarea({
|
||||
color: color.value,
|
||||
@@ -185,7 +185,7 @@ onMounted(() => {
|
||||
:class="ui.base({ class: props.ui?.base })"
|
||||
:disabled="disabled"
|
||||
:required="required"
|
||||
v-bind="$attrs"
|
||||
v-bind="{ ...$attrs, ...ariaAttrs }"
|
||||
@input="onInput"
|
||||
@blur="onBlur"
|
||||
@change="onChange"
|
||||
|
||||
Reference in New Issue
Block a user