From T337967#8983016:
After studying the W3C guidelines for how to represent the Tabs UI pattern in an accessible way, I think that we have a basic outline of a solution:
- Tab items in the list should be <button> elements, not links – this is true for both the CSS-only and the JS-enabled versions of the component
- Our current focus handling code will likely need to change, but we can visually keep things looking the same with minor style changes.
An initial patch demonstrating this approach is available here: https://gerrit.wikimedia.org/r/934626, and you can see a live demo here: https://934626--wikimedia-codex.netlify.app/components/demos/tabs.html#demos