The role property of the Element interface returns the explicitly set WAI-ARIA role for the element.
role
MDN Reference