blockly > utils > aria > getRole
utils.aria.getRole() function
Returns the ARIA role of the specified element, or null if it either doesn't have a designated role or if that role is unknown.
Signature:
export declare function getRole(element: Element): Role | null;
Parameters
Parameter | Type | Description |
|---|---|---|
element | Element | The element from which to retrieve its ARIA role. |
Returns:
Role | null
The ARIA role of the element, or null if undefined or unknown.