4 ms·
A Pure-CSS Approach to Tabs (2014)
- arunitc 11y agoThis breaks the browser back button since each click on the tab heading is a hyperlink
- rajangdavis 11y agoWhich browser are you using? I am using Chrome and the back button worked as expected. This is a neat little hack!
- bobwaycott 11y agoMobile Safari back button was borked by this.
- Rumudiez 11y agoYep. An older CSS-only tabs trick involves using <label>s for hidden radio inputs and toggling visibility with the :checked pseudo class. From a screen reader supporting standpoint, this :target solution would be better if not for the back button problem.
- cobalt 11y agoAnother approach is to use hidden radio buttons and labels