"Similarly, since this button is not for a form submit, it needs the explicit role of button to prevent triggering a get request and page reload."
I think you mean for that purpose, it needs type="button", not role="button"
You are correct! I was working on this too late and got my wires crossed :) Updated, thanks!
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.