diff --git a/frontend/src/components/_common/Tabs/TabButton.tsx b/frontend/src/components/_common/Tabs/TabButton.tsx index 983271e0e..3b50abfb5 100644 --- a/frontend/src/components/_common/Tabs/TabButton.tsx +++ b/frontend/src/components/_common/Tabs/TabButton.tsx @@ -10,11 +10,12 @@ interface Props extends Tab { onMoveTab: (id: number) => void; active: boolean; isCompleted?: boolean; + tabIndex?: number; } -const TabButton = ({ id, onMoveTab, name, active, className, isCompleted }: Props) => { +const TabButton = ({ id, onMoveTab, name, active, className, isCompleted, ...rest }: Props) => { return ( - onMoveTab(id)} active={active}> + onMoveTab(id)} active={active} role="tab" {...rest}> {name} {isCompleted === false && } diff --git a/frontend/src/components/_common/Tabs/Tabs.tsx b/frontend/src/components/_common/Tabs/Tabs.tsx index 6d22aa794..88fda6ffb 100644 --- a/frontend/src/components/_common/Tabs/Tabs.tsx +++ b/frontend/src/components/_common/Tabs/Tabs.tsx @@ -20,9 +20,9 @@ const Tabs = ({ tabList }: Props) => { ); return ( - + - + {tabList?.map(tab => { const { id, name, className } = tab; const isCompleted = 'isCompleted' in tab ? tab.isCompleted : undefined; @@ -35,6 +35,8 @@ const Tabs = ({ tabList }: Props) => { onMoveTab={onMoveTab} key={id} active={tab.id === currentTabId} + tabIndex={tab.id === currentTabId ? 0 : -1} + aria-selected={tab.id === currentTabId} isCompleted={isCompleted} /> );