ElementInternals: role property

The role read-only property of the ElementInternals interface returns the WAI-ARIA role for the element. For example, a checkbox might have role="checkbox".

Value

A string which contains an ARIA role. A full list of ARIA roles can be found on the ARIA techniques page.

Examples

Specifications

Specification
Accessible Rich Internet Applications (WAI-ARIA)
# dom-ariamixin-role

Browser compatibility

desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
role