Skip to content

Commit

Permalink
Fix a11y violation: no tabpanel in a tablist
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinnl committed Nov 7, 2022
1 parent 17f7f1d commit fd5dd11
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions frontend/src/components/landing/carousel/Carousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,18 @@ const Tabs = (props: TabsProps) => {
}, []);

return (
<div
{...tabListProps}
ref={tabsRef}
className={`${styles.sections} ${
styles["selected-tab-" + state.selectedItem.index]
}`}
>
{Array.from(state.collection).map((item) => (
<Tab key={item.key} item={item} state={state} />
))}
<div>
<div
{...tabListProps}
ref={tabsRef}
className={`${styles.sections} ${
styles["selected-tab-" + state.selectedItem.index]
}`}
>
{Array.from(state.collection).map((item) => (
<Tab key={item.key} item={item} state={state} />
))}
</div>
<Container key={state.selectedItem.key} state={state} />
</div>
);
Expand Down

0 comments on commit fd5dd11

Please sign in to comment.