This is a tough one. When you click the link on the alert.html it will open a new window but then IMMEDIATELY this new window will open an alert. I believe once the alert is open you are losing control in Selenium. You cannot switch to the alert before you open the new window because the alert does not exist. The moment you click the link on the main window, it opens a new window and focus goes to the new alert. I think at that point you need something outside of Selenium to find and click the alert
Essentially, you cannot dismiss or accept the alert until you switch to the new window but you cannot switch to the new window because there is an alert present. Looks like you found something you cannot do with Selenium alone.