Elements with onClick handlers must also have keyboard event handlers for accessibility.
Users who are not using a mouse, such as those using keyboards or assistive technologies, often rely on those keyboard events to be able to use the page.
If non-interactive elements such as <div>s with an onClick event handler should have at least one of the following corresponding keyboard events registered as well:
onKeyDown
onKeyPress
onKeyUp
Interactive elements like <button> and <input> are already keyboard accessible and don’t require additional handlers.