Accessible tabs, with CSS that reads the state
The ARIA tabs pattern looks small, but it hides a dozen decisions. Here is the markup, the keyboard code and a way of writing CSS that can't drift from what screen readers are told, with a position on every contested point.