fix(components): [checkbox] indeterminate checkbox a11y fix (#14322)

This commit is contained in:
Karolis_Stoncius_Sneakybox 2023-10-12 16:55:23 +03:00 committed by GitHub
parent 942284dbe1
commit 9e08fef52c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,19 +5,14 @@
:aria-controls="indeterminate ? controls : null"
@click="onClickRoot"
>
<span
:class="spanKls"
:tabindex="indeterminate ? 0 : undefined"
:role="indeterminate ? 'checkbox' : undefined"
:aria-checked="indeterminate ? 'mixed' : undefined"
>
<span :class="spanKls">
<input
v-if="trueLabel || falseLabel"
:id="inputId"
v-model="model"
:class="ns.e('original')"
type="checkbox"
:aria-hidden="indeterminate ? 'true' : 'false'"
:indeterminate="indeterminate"
:name="name"
:tabindex="tabindex"
:disabled="isDisabled"
@ -34,7 +29,7 @@
v-model="model"
:class="ns.e('original')"
type="checkbox"
:aria-hidden="indeterminate ? 'true' : 'false'"
:indeterminate="indeterminate"
:disabled="isDisabled"
:value="label"
:name="name"