Fixed #5293 - aria-invalid state added to Input components

pull/5300/head
tugcekucukoglu 2024-02-16 14:42:42 +03:00
parent c8d6546ea0
commit 2a657bc85b
15 changed files with 16 additions and 3 deletions

View File

@ -20,6 +20,7 @@
:aria-expanded="overlayVisible" :aria-expanded="overlayVisible"
:aria-controls="id + '_list'" :aria-controls="id + '_list'"
:aria-activedescendant="focused ? focusedOptionId : undefined" :aria-activedescendant="focused ? focusedOptionId : undefined"
:aria-invalid="invalid || undefined"
@focus="onFocus" @focus="onFocus"
@blur="onBlur" @blur="onBlur"
@keydown="onKeyDown" @keydown="onKeyDown"
@ -78,6 +79,7 @@
:aria-expanded="overlayVisible" :aria-expanded="overlayVisible"
:aria-controls="id + '_list'" :aria-controls="id + '_list'"
:aria-activedescendant="focused ? focusedOptionId : undefined" :aria-activedescendant="focused ? focusedOptionId : undefined"
:aria-invalid="invalid || undefined"
@focus="onFocus" @focus="onFocus"
@blur="onBlur" @blur="onBlur"
@keydown="onKeyDown" @keydown="onKeyDown"

View File

@ -16,6 +16,7 @@
:aria-controls="panelId" :aria-controls="panelId"
:aria-labelledby="ariaLabelledby" :aria-labelledby="ariaLabelledby"
:aria-label="ariaLabel" :aria-label="ariaLabel"
:aria-invalid="invalid || undefined"
inputmode="none" inputmode="none"
:disabled="disabled" :disabled="disabled"
:readonly="!manualInput || readonly" :readonly="!manualInput || readonly"

View File

@ -18,6 +18,7 @@
:aria-expanded="overlayVisible" :aria-expanded="overlayVisible"
:aria-controls="id + '_tree'" :aria-controls="id + '_tree'"
:aria-activedescendant="focused ? focusedOptionId : undefined" :aria-activedescendant="focused ? focusedOptionId : undefined"
:aria-invalid="invalid || undefined"
@focus="onFocus" @focus="onFocus"
@blur="onBlur" @blur="onBlur"
@keydown="onKeyDown" @keydown="onKeyDown"

View File

@ -14,6 +14,7 @@
:required="required" :required="required"
:aria-labelledby="ariaLabelledby" :aria-labelledby="ariaLabelledby"
:aria-label="ariaLabel" :aria-label="ariaLabel"
:aria-invalid="invalid || undefined"
@focus="onFocus" @focus="onFocus"
@blur="onBlur" @blur="onBlur"
@change="onChange" @change="onChange"

View File

@ -44,6 +44,7 @@
:style="inputStyle" :style="inputStyle"
:disabled="disabled || maxedOut" :disabled="disabled || maxedOut"
:placeholder="placeholder" :placeholder="placeholder"
:aria-invalid="invalid || undefined"
@focus="onFocus($event)" @focus="onFocus($event)"
@blur="onBlur($event)" @blur="onBlur($event)"
@input="onInput" @input="onInput"

View File

@ -19,6 +19,7 @@
:aria-expanded="overlayVisible" :aria-expanded="overlayVisible"
:aria-controls="id + '_list'" :aria-controls="id + '_list'"
:aria-activedescendant="focused ? focusedOptionId : undefined" :aria-activedescendant="focused ? focusedOptionId : undefined"
:aria-invalid="invalid || undefined"
@focus="onFocus" @focus="onFocus"
@blur="onBlur" @blur="onBlur"
@keydown="onKeyDown" @keydown="onKeyDown"

View File

@ -1,5 +1,5 @@
<template> <template>
<input :class="cx('root')" :readonly="readonly" @input="onInput" @focus="onFocus" @blur="onBlur" @keydown="onKeyDown" @keypress="onKeyPress" @paste="onPaste" v-bind="ptmi('root', ptmParams)" /> <input :class="cx('root')" :readonly="readonly" :aria-invalid="invalid || undefined" @input="onInput" @focus="onFocus" @blur="onBlur" @keydown="onKeyDown" @keypress="onKeyPress" @paste="onPaste" v-bind="ptmi('root', ptmParams)" />
</template> </template>
<script> <script>

View File

@ -15,6 +15,7 @@
:placeholder="placeholder" :placeholder="placeholder"
:aria-labelledby="ariaLabelledby" :aria-labelledby="ariaLabelledby"
:aria-label="ariaLabel" :aria-label="ariaLabel"
:aria-invalid="invalid || undefined"
@input="onUserInput" @input="onUserInput"
@keydown="onInputKeyDown" @keydown="onInputKeyDown"
@keypress="onInputKeyPress" @keypress="onInputKeyPress"

View File

@ -13,6 +13,7 @@
:aria-checked="checked" :aria-checked="checked"
:aria-labelledby="ariaLabelledby" :aria-labelledby="ariaLabelledby"
:aria-label="ariaLabel" :aria-label="ariaLabel"
:aria-invalid="invalid || undefined"
@focus="onFocus" @focus="onFocus"
@blur="onBlur" @blur="onBlur"
@change="onChange" @change="onChange"

View File

@ -1,5 +1,5 @@
<template> <template>
<input :class="cx('root')" :value="modelValue" @input="onInput" v-bind="getPTOptions('root')" /> <input :class="cx('root')" :value="modelValue" :aria-invalid="invalid || undefined" @input="onInput" v-bind="getPTOptions('root')" />
</template> </template>
<script> <script>

View File

@ -16,6 +16,7 @@
:aria-expanded="overlayVisible" :aria-expanded="overlayVisible"
:aria-controls="id + '_list'" :aria-controls="id + '_list'"
:aria-activedescendant="focused ? focusedOptionId : undefined" :aria-activedescendant="focused ? focusedOptionId : undefined"
:aria-invalid="invalid || undefined"
@focus="onFocus" @focus="onFocus"
@blur="onBlur" @blur="onBlur"
@keydown="onKeyDown" @keydown="onKeyDown"

View File

@ -13,6 +13,7 @@
:readonly="readonly" :readonly="readonly"
:aria-labelledby="ariaLabelledby" :aria-labelledby="ariaLabelledby"
:aria-label="ariaLabel" :aria-label="ariaLabel"
:aria-invalid="invalid || undefined"
@focus="onFocus" @focus="onFocus"
@blur="onBlur" @blur="onBlur"
@change="onChange" @change="onChange"

View File

@ -1,5 +1,5 @@
<template> <template>
<textarea :class="cx('root')" :value="modelValue" @input="onInput" v-bind="ptmi('root', ptmParams)"></textarea> <textarea :class="cx('root')" :value="modelValue" :aria-invalid="invalid || undefined" @input="onInput" v-bind="ptmi('root', ptmParams)"></textarea>
</template> </template>
<script> <script>

View File

@ -13,6 +13,7 @@
:readonly="readonly" :readonly="readonly"
:aria-labelledby="ariaLabelledby" :aria-labelledby="ariaLabelledby"
:aria-label="ariaLabel" :aria-label="ariaLabel"
:aria-invalid="invalid || undefined"
@focus="onFocus" @focus="onFocus"
@blur="onBlur" @blur="onBlur"
@change="onChange" @change="onChange"

View File

@ -12,6 +12,7 @@
:readonly="readonly" :readonly="readonly"
:aria-labelledby="ariaLabelledby" :aria-labelledby="ariaLabelledby"
:aria-label="ariaLabel" :aria-label="ariaLabel"
:aria-invalid="invalid || undefined"
@focus="onFocus" @focus="onFocus"
@blur="onBlur" @blur="onBlur"
@change="onChange" @change="onChange"