See how this could be easily implemented with links, <dialog> or <buttons> in HTML5. The web made progress.
<dialog>
<buttons>