blockly > utils > aria > setState
utils.aria.setState() function
Sets the specified ARIA state by its name and value for the specified element.
Note that the type of value is not validated against the specific type of state being changed, so it's up to callers to ensure the correct value is used for the given state.
Signature:
export declare function setState(element: Element, stateName: State, value: string | boolean | number | string[]): void;
Parameters
Parameter | Type | Description |
|---|---|---|
element | Element | The element whose ARIA state may be changed. |
stateName | State | The state to change. |
value | string | boolean | number | string[] | The new value to specify for the provided state. |
Returns:
void