Element.ariaChecked is an instance property that reflects the aria-checked attribute. Learn the true, mixed, false, and undefined values, when to prefer a native checkbox, and how to get or set the property from JavaScript—with five examples and try-it labs.
01
Kind
Instance property
02
Type
String
03
Values
true · mixed · false · undefined
04
Reflects
aria-checked
05
Status
Baseline widely
06
Used on
Checkbox / radio widgets
Fundamentals
Introduction
Custom checkboxes, radios, and menu items need a clear checked state for assistive technologies. That state is what aria-checked communicates.
The DOM property ariaChecked lets you read and update the same value from JavaScript—useful when you toggle a custom widget with script.
JavaScript
const el = document.getElementById("checkBoxInput");
console.log(el.ariaChecked); // "false"
el.ariaChecked = "true";
💡
Beginner tip
Prefer a native <input type="checkbox"> when you can. It already exposes checked state without ARIA. Use ariaChecked for custom widgets that cannot use the native control.
Concept
Understanding the Property
MDN: the ariaChecked property of the Element interface reflects the value of the aria-checked attribute, which indicates the current “checked” state of checkboxes, radio buttons, and other widgets that have a checked state.
Reflected attribute — mirrors aria-checked.
Get / set — readable and writable string.
Four tokens — true, mixed, false, undefined.
Baseline — widely available since October 2023 (MDN).
Foundation
📝 Syntax
JavaScript
ariaChecked
Value
A string with one of the following values:
Value
Meaning (MDN)
"true"
The element is checked.
"mixed"
Mixed / tri-state value for a checkbox or menuitemcheckbox.
"false"
Supports being checked but is not currently checked.
"undefined"
The element does not support being checked.
Pattern
📋 Custom Checkbox (MDN Shape)
MDN starts with an unchecked custom checkbox (aria-checked="false"), then updates to "true" with the property:
Element.ariaChecked is Baseline Widely available (MDN: across browsers since October 2023). Logos use the shared browser-image-sprite.png sprite from this project.
Internet ExplorerNo ariaChecked IDL — use setAttribute
No
ariaCheckedBaseline
Bottom line: Use ariaChecked to get/set aria-checked on custom checkable widgets. Prefer native checkboxes when possible. Keep visual state and keyboard behavior in sync with the token you set.
Wrap Up
Conclusion
ariaChecked reflects aria-checked so custom checkboxes, radios, and related widgets can expose checked, unchecked, mixed, or unsupported states. Prefer native checkboxes when you can; when you build a custom control, keep the property, visuals, and keyboard behavior aligned.
Reflected aria-checked string for checkable widgets.
5
Core concepts
📄01
Get / set
on Element
Kind
📝02
Four values
true mixed false undefined
Tokens
🔍03
Custom widgets
checkbox / radio
Use
✅04
Baseline
widely available
Status
🎯05
Prefer native
type=checkbox
Rule
❓ Frequently Asked Questions
It reflects the aria-checked attribute as a string, indicating the checked state of checkboxes, radio buttons, and other widgets that support a checked state.
No. MDN marks Element.ariaChecked as Baseline Widely available (since October 2023). It is not Deprecated, Experimental, or Non-standard.
One of the strings "true", "mixed", "false", or "undefined".
Yes when possible. MDN recommends an HTML input with type="checkbox" because it has built-in semantics and does not require ARIA attributes.
A tri-state / indeterminate value for a checkbox or menuitemcheckbox — neither fully checked nor unchecked (for example a parent checkbox with some children selected).
Yes. Reading and writing ariaChecked updates the reflected aria-checked attribute.
Did you know?
The string "undefined" is a real ARIA token meaning “does not support being checked”—it is not the same as JavaScript’s undefined value when the attribute is missing.