#2 div with button role

from blog HTMHell, | ↗ original
↗ original
Bad code div tabindex="-1"> div role="button"> svg width="28" height="24"> … svg> div>div> Issues and how to fix them Setting button semantics explicitly using the role attribute isn’t necessary, there’s an element for that (button). You don’t need the tabindex attribute if you use a button. HTML buttons are focusable by default. A click...