In HTML, you should use the role="button" attribute when you want to indicate that an element on your web page acts like a button if it's not a traditional HTML element. This is particularly important for accessibility purposes, as it helps screen readers and assistive technologies understand the interactive nature of the element. Button should be everything else other than links. For example link that opens modal window, link that expands accordion, sort links, etc.
Source code viewer
Programming Language: HTML