diff --git a/packages/components/src/components/checkbox/checkbox.tsx b/packages/components/src/components/checkbox/checkbox.tsx index b5f25b1e52..7b5abf0a2e 100644 --- a/packages/components/src/components/checkbox/checkbox.tsx +++ b/packages/components/src/components/checkbox/checkbox.tsx @@ -188,7 +188,7 @@ export class Checkbox { indeterminate={this.indeterminate} aria-label={this.ariaLabelCheckbox} aria-checked={this.indeterminate ? 'mixed' : false} - aria-invalid={this.status === 'error' || this.invalid} + aria-invalid={this.status === 'error' || this.invalid ? 'true' : null} aria-describedBy={helperText.id} disabled={this.disabled} required={this.required} diff --git a/packages/components/src/components/dropdown/dropdown.tsx b/packages/components/src/components/dropdown/dropdown.tsx index c9c2dfcbda..ffd36e0bba 100644 --- a/packages/components/src/components/dropdown/dropdown.tsx +++ b/packages/components/src/components/dropdown/dropdown.tsx @@ -240,7 +240,7 @@ export class Dropdown { render() { const ariaInvalidAttr = - this.status === 'error' || this.invalid ? { 'aria-invalid': true } : {}; + this.status === 'error' || this.invalid ? { 'aria-invalid': 'true' } : {}; const helperTextId = `helper-message-${this.internalId}`; const ariaDescribedByAttr = { 'aria-describedBy': helperTextId }; diff --git a/packages/components/src/components/input/__snapshots__/input.spec.ts.snap b/packages/components/src/components/input/__snapshots__/input.spec.ts.snap index 94cf6a0567..628b40bb66 100644 --- a/packages/components/src/components/input/__snapshots__/input.spec.ts.snap +++ b/packages/components/src/components/input/__snapshots__/input.spec.ts.snap @@ -8,7 +8,7 @@ exports[`Input props should reflect attributes 1`] = ` label