Skip to content

Commit 6c4e90c

Browse files
committed
refactor(Checkbox, DataList, MenuToggle, Radio)!: Removed valid/invalid attributes. Use aria-invalid instead.
1 parent 249c67b commit 6c4e90c

File tree

4 files changed

+2
-15
lines changed

4 files changed

+2
-15
lines changed

packages/core/src/components/Checkbox.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@ export interface Props extends OUIAProps, /* @vue-ignore */ Omit<InputHTMLAttrib
6767
disabled?: boolean;
6868
/** Flag to show if the checkbox is required. */
6969
required?: boolean;
70-
/** Flag to show if the checkbox selection is valid or invalid. */
71-
valid?: boolean;
7270
/** Id of the checkbox. */
7371
id?: string;
7472
/** Label text of the checkbox. */

packages/core/src/components/DataList/DataListCheck.vue

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
v-bind="$attrs"
66
v-model="managedChecked"
77
type="checkbox"
8-
:disabled="disabled"
9-
:aria-invalid="invalid"
108
>
119
</div>
1210
</component>
@@ -23,10 +21,8 @@ defineOptions({
2321
inheritAttrs: false,
2422
});
2523
26-
export interface Props extends OUIAProps, /* @vue-ignore */ InputHTMLAttributes {
24+
export interface Props extends OUIAProps, /* @vue-ignore */ Omit<InputHTMLAttributes, 'type'> {
2725
otherControls?: boolean;
28-
disabled?: boolean;
29-
invalid?: boolean;
3026
checked?: boolean;
3127
}
3228

packages/core/src/components/MenuToggle/MenuToggleCheckbox.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
:ref="(el) => (el as HTMLInputElement).indeterminate = checked === null"
66
:class="styles.checkInput"
77
type="checkbox"
8-
:aria-invalid="!valid"
98
:checked="Boolean(checked)"
109
>
1110
</label>
@@ -22,9 +21,6 @@ defineOptions({
2221
});
2322
2423
export interface Props extends OUIAProps, /* @vue-ignore */ Omit<InputHTMLAttributes, 'checked'> {
25-
/** Flag to show if the checkbox selection is valid or invalid */
26-
valid?: boolean;
27-
2824
/** Flag to show if the checkbox is checked. Use null to set the checkbox indeterminate state */
2925
checked?: boolean | null;
3026
}

packages/core/src/components/Radio.vue

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
v-bind="$attrs"
2828
type="radio"
2929
:class="styles.radioInput"
30-
:aria-invalid="!valid"
3130
:disabled="disabled"
3231
:checked="checked"
3332
:aria-label="(label || $slots.label) ? undefined : ariaLabel"
@@ -60,7 +59,7 @@ defineOptions({
6059
inheritAttrs: false,
6160
});
6261
63-
export interface Props extends OUIAProps, /* @vue-ignore */ Omit<InputHTMLAttributes, 'type' | 'aria-invalid'> {
62+
export interface Props extends OUIAProps, /* @vue-ignore */ Omit<InputHTMLAttributes, 'type'> {
6463
component?: string | Component;
6564
/** Id of the radio. */
6665
id?: string;
@@ -70,8 +69,6 @@ export interface Props extends OUIAProps, /* @vue-ignore */ Omit<InputHTMLAttrib
7069
checked?: boolean;
7170
/** Flag to show if the radio is disabled. */
7271
disabled?: boolean;
73-
/** Flag to show if the radio selection is valid or invalid. */
74-
valid?: boolean;
7572
/** Label text of the radio. */
7673
label?: string;
7774
/** Aria label for the radio. */

0 commit comments

Comments
 (0)