DEV Community

Zeyad Etman
Zeyad Etman

Posted on

Answer: Focus styling is not working correctly in a react component?

You can't do this using css/html without tabindex and according to MDN:

Avoid using the tabindex attribute in conjunction with non-interactive content to make something intended to be interactive focusable by keyboard input. An example of this would be using an <div> element to describe a button, instead ofโ€ฆ

Top comments (0)