I am trying to duplicate the current tabs in https://www.freecodecamp.org/learn/2022/responsive-web-design/learn-basic-css-by-building-a-cafe-menu/step-5
But if I keep going and finish the PRs, I will create something like this:
<ul role='tablist' className={styles} {...props}>
<li role='presentation'>
<a
className={classes}
id={tabId}
role='tab'
aria-controls={ariaControls}
aria-selected={isActive}
{...props}
>
{eventKey}
</a>
</li>
<li role='presentation'>
<a
className={classes}
id={tabId}
role='tab'
aria-controls={ariaControls}
aria-selected={isActive}
{...props}
>
{eventKey}
</a>
</li>
{children}
</ul>
So, I am wondering if it’s better to have them as buttons? because they don’t act as links but button that open different tabs. Or maybe radio input , that will display different tabs.
So I am wondering is it good to switch them to button
elements? or is it fine to have them as list with links in them?
Here are the PRs:
feat(tools): add tabs component by Sboonny · Pull Request #49856 · freeCodeCamp/freeCodeCamp (github.com)
feat(tools): tab pane component by Sboonny · Pull Request #49786 · freeCodeCamp/freeCodeCamp (github.com)