Screen reader or text browser users would have a hard time to play this game if you’d not use a table
.
If you use div
elements to build that grid, you would have to be very verbose about which cell has which coordinates (each cell would need to be labeled explicitly), and the players would need to concentrate to "rebuild" this grid in their mind. Like playing chess via phone. Possible, yes, but harder than having the board in front of you.
So yes, I think you should use a table
. The order of grid cells is important and meaningful, and each cell is labeled by two headings (x/y axis).
Using a table
, your grid would be perfectly usable by screen reader users (most screen readers can announce the headings/coordinates of the cells) and in a text browser, too (w3m in this case):
Try that without a table
. div
elements have no concept of top/right/bottom/left neighbours.