Skip to content

Commit 8cb43c9

Browse files
committed
fix(tabs): wrong labelledBy value
1 parent edc3501 commit 8cb43c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/kit-headless/src/components/tabs/tabs-panel.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const TabPanel = component$(({ ...props }: TabPanelProps) => {
1717
const panelUID = useId();
1818

1919
const matchedTabId = useComputed$(
20-
() => contextService.tabPanelsMap[panelUID]?.index
20+
() => contextService.tabPanelsMap[panelUID]?.tabId
2121
);
2222

2323
useTask$(({ cleanup }) => {
@@ -42,7 +42,7 @@ export const TabPanel = component$(({ ...props }: TabPanelProps) => {
4242
role="tabpanel"
4343
tabIndex={0}
4444
hidden={isSelectedSignal.value ? undefined : true}
45-
aria-labelledby={`tab-${matchedTabId}`}
45+
aria-labelledby={`tab-${matchedTabId.value}`}
4646
class={`${isSelectedSignal.value ? 'is-hidden' : ''}${
4747
props.class ? ` ${props.class}` : ''
4848
}`}

0 commit comments

Comments
 (0)