Thanks for the feedback!
The embedded HTML page worked in my testing on Firefox and Chrome, but it is very picky. If you click out of the iframe or use certain browser keyboard shortcuts then the application seems to lose the ability to process keyboard input (as you mentioned). I am looking into how to correct this for future SDL2 applications I put on itch.io, but for now you can visit https://www.ashn.dev/proj/life.html if you would like play a version of the game that (likely) does not suffer from this issue
Thanks again for taking the time to check out my submission!