Since October 2023, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
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". It reflects the role attribute; it does not return the element's implicit ARIA role, if any, unless explicitly set.
A string which contains an ARIA role. A full list of ARIA roles can be found on the ARIA techniques page.
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
role |
103 | 103 | 119 | 89 | 16.4 | 103 | 119 | 71 | 16.4 | 20.0 | 103 | 16.4 |
© 2005–2025 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