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

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Opera Safari Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet WebView Android
role 103 103 119 89 16.4 103 119 71 16.4 20.0 103

© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/role