Function: isElementDisabled()
isElementDisabled(
element):boolean
Defined in: packages/core/src/utils/elementStateUtil.ts:66
Whether the element is disabled, via the native disabled state — including the
<fieldset disabled> and <optgroup disabled> cascades the HTML spec defines —
or the nearest aria-disabled on the element or an ancestor being "true".
The nearest explicit aria-disabled wins, so a re-enabled descendant of a
disabled container reports false. An element with no disabled semantics at all
reports false rather than throwing, so the read stays total in both engines.
Parameters​
element​
Element
The element whose disabled state is being decided. It must be the
control itself; a <label> pointing at one is not retargeted.
Returns​
boolean