If we could use hidden radio inputs with labels for the tabs, maybe we could just have the browser handle all that and we can only listen the change event to change the tab, but maybe is a bit hacky?