W3cubDocs

/Web APIs

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 Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
role 103 103 119 No 89 16.4 103 103 119 71 16.4 20.0

© 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