ElementInternals: role property

فهرست فصل‌ها دانلود آرشیوناشر

MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونه‌کد

{{APIRef("Web Components")}}

The **role** property of the {{domxref("ElementInternals")}} interface returns the WAI-ARIA role for the element. For example, a checkbox might have [role="checkbox"](/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/checkbox_role). It reflects the role attribute; it does not return the element's implicit ARIA role, if any, unless explicitly set.

Value

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

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}