Usually if it's the CMOS (complimentary metal oxide conductor) battery, which is what I believe you mean, you usually get a different set of beeps and a message saying cmos bad or you notice the time is reset.It's pretty straight forward. HOWEVER, I just had a friend's pc which the cmos battery was bad and it simply wouldn't boot, no keyboard access, no cmos errors, nothing. It worked after a replacement but I haven't run across this too often, just this once. I still won't rule it out, it's just not likely to me, i'd give it a 1% chance, if that, that it is the battery.For a 2.99, I don't think you would be losing out to try it. Depending on the Motherboard though, you may have a welded battery, those can be a pain to replace and to find. They are tacked right to the connectors.
If you can't detect your keyboard, try another one. Many times things can go bad at the same time on a pc and can stump the best of em. It's not usually expected and most look for one problem, not two that happened at the same time. If you can get a working keyboard then you can troubleshoot further.
Now what I honestly think from running into this problem quite a few times, is a bad bios or motherboard which in most cases since integrated, means trash either way. The reason i say this is because most keyboards, assuming you use the keyboard\mainboard port, are usually attached to the motherboard and detected by the cmos\bios itself. If it won't detect a keyboard and won't boot then I would think failure.
Usually if an OS or HD failure, you can still get into cmos. So I don't feel this is the problem.
I also don't think it's coincidence that the keyboard and system are doing this at the same time but like i mentioned above, things like that can happen. Good luck! Paul