I have a ChevronUp/down icon which serves as a button to open/close the menu.
I want to give keyboard focus to the icon for accessibility support.
I tried to add it into "a" tag
<a href="#"> <i></i> </a>
It gives focus but when it's clicked, the href="#" part will make the page refresh. I am wondering what's the best way to give keyboard focus for tag?
I tried "return false" for the <a>
tag, but it also doesn't work as it will disable the all onclick events.