ElementInternals.role

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

Syntax

let role = ElementInternals.role;

Value

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

Examples

Specifications

No specification found

No specification data found for api.ElementInternals.role.
Check for problems with this page or contribute a missing spec_url to mdn/browser-compat-data. Also make sure the specification is included in w3c/browser-specs.

Browser compatibility

No compatibility data found for api.ElementInternals.role.
Check for problems with this page or contribute missing data to mdn/browser-compat-data.