ARIA properties have specific value types defined in the WAI-ARIA specification.
Each property expects values of a particular type, such as boolean, integer, token, or string.
Providing values that don’t match the expected type can cause assistive technologies to ignore the property or behave unexpectedly.
Common value types include:
boolean: true or false (e.g., aria-disabled, aria-hidden)
tristate: true, false, or mixed (e.g., aria-checked, aria-pressed)
Indicates whether the element is exposed to an accessibility API.
@see ― aria-disabled.
aria-hidden="yes" />
Error ts(2322) ― Type '{ "aria-hidden": "yes"; }' is not assignable to type 'DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>'.
Type '{ "aria-hidden": "yes"; }' is not assignable to type 'HTMLAttributes<HTMLDivElement>'.
Types of property '"aria-hidden"' are incompatible.
Type '"yes"' is not assignable to type 'Booleanish | undefined'.
Indicates the current "checked" state of checkboxes, radio buttons, and other widgets.
@see ― aria-pressed
@see ― aria-selected.
aria-checked="1" />
Error ts(2322) ― Type '{ "aria-checked": "1"; }' is not assignable to type 'DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>'.
Type '{ "aria-checked": "1"; }' is not assignable to type 'InputHTMLAttributes<HTMLInputElement>'.
Types of property '"aria-checked"' are incompatible.
Type '"1"' is not assignable to type 'boolean | "false" | "mixed" | "true" | undefined'.
<div
AriaAttributes["aria-level"]?: number |undefined
Defines the hierarchical level of an element within a structure.
aria-level="low" />
Error ts(2322) ― Type '{ "aria-level": string; }' is not assignable to type 'DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>'.
Type '{ "aria-level": string; }' is not assignable to type 'HTMLAttributes<HTMLDivElement>'.
Types of property '"aria-level"' are incompatible.
Type 'string' is not assignable to type 'number'.
Indicates the current "pressed" state of toggle buttons.
@see ― aria-checked
@see ― aria-selected.
aria-pressed="yes" />
Error ts(2322) ― Type '{ "aria-pressed": "yes"; }' is not assignable to type 'DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>'.
Type '{ "aria-pressed": "yes"; }' is not assignable to type 'ButtonHTMLAttributes<HTMLButtonElement>'.
Types of property '"aria-pressed"' are incompatible.
Type '"yes"' is not assignable to type 'boolean | "false" | "mixed" | "true" | undefined'.
Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be
presented if they are made.
aria-autocomplete="invalid" />
Error ts(2322) ― Type '{ "aria-autocomplete": "invalid"; }' is not assignable to type 'DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>'.
Type '{ "aria-autocomplete": "invalid"; }' is not assignable to type 'HTMLAttributes<HTMLDivElement>'.
Types of property '"aria-autocomplete"' are incompatible.
Type '"invalid"' is not assignable to type '"none" | "inline" | "list" | "both" | undefined'.
Indicates the current "checked" state of checkboxes, radio buttons, and other widgets.
@see ― aria-pressed
@see ― aria-selected.
aria-checked="true" />
<div
AriaAttributes["aria-level"]?: number |undefined
Defines the hierarchical level of an element within a structure.
aria-level="1" />
Error ts(2322) ― Type '{ "aria-level": string; }' is not assignable to type 'DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>'.
Type '{ "aria-level": string; }' is not assignable to type 'HTMLAttributes<HTMLDivElement>'.
Types of property '"aria-level"' are incompatible.
Type 'string' is not assignable to type 'number'.
Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be
presented if they are made.
If you are using a framework that automatically transforms specific invalid property values to match the ARIA specification, this rule might not be useful for you.