Each attribute has its own purpose, so you cannot confidently say whether to use them or not.
The element with the id attribute is unique on the page.
id are used to work with js.
For example, you should not specify id = "header" if in the future JS manipulations will not be performed with the element.
The class attribute is intended to describe the element styles. You can also access an element using JS by class selector, but in most cases it is desirable to use the data-role attribute for these purposes, thereby isolating the JS operation from the classes and increasing the readability of the code. Using the data-role, you can specify the behavior / purpose of the element, for example, data-role = "slider", data-role = "modal", data-role = "button", etc.
The role attribute is initially semantic.
Possible values ​​are described in the specification.
roleattribute : accessibility, device adaptation, server-side processing, and complex data description. - Grundy