This example was taken from the ARIA Authoring Practices. It is the Example of Tabs with Automatic Activation. I gave it a "dark mode" appearance but, other than that, it's their code. They've documented the keyboard support on their page. I didn't want to reinvent the wheel, I just wanted an example I could easily style and understand. For more information about the roles and structures used and expected behavior of this widget, follow the aforementioned link.
"Trying to define yourself is like trying to bite your own teeth."
"I help people as a work on myself and I work on myself to help people."
"You teach people how to treat you."
"It suddenly struck me that that tiny pea, pretty and blue, was the Earth."