The HTML structure is very problematic. You use a <table>, even though semantically the game grid is not a table of data. I would have used a <div> with display:grid , though this is not a big deal. The active cell is a <div> with onclick, which means the cursor doesn't show it as clickable and I can't even tab to it so keyboard play is impossible. There are ways to make a <div> look clickable, but it's easiest to just use <button> .