diff --git a/packages/components/src/components/tab-item/tab-item.lite.tsx b/packages/components/src/components/tab-item/tab-item.lite.tsx
index 461523cf621..aaa12c9a370 100644
--- a/packages/components/src/components/tab-item/tab-item.lite.tsx
+++ b/packages/components/src/components/tab-item/tab-item.lite.tsx
@@ -45,7 +45,6 @@ export default function DBTabItem(props: DBTabItemProps) {
disabled={props.disabled}
ref={ref}
type="radio"
- role="tab"
id={state._id}
/>
diff --git a/packages/components/src/components/tab-list/tab-list.lite.tsx b/packages/components/src/components/tab-list/tab-list.lite.tsx
index 4476900cee5..165a05fa9cd 100644
--- a/packages/components/src/components/tab-list/tab-list.lite.tsx
+++ b/packages/components/src/components/tab-list/tab-list.lite.tsx
@@ -24,9 +24,8 @@ export default function DBTabList(props: DBTabListProps) {
-
+ class={cls('db-tab-list', props.className)}>
+
);
}
diff --git a/packages/components/src/components/tab-panel/tab-panel.lite.tsx b/packages/components/src/components/tab-panel/tab-panel.lite.tsx
index f599180c5ff..5838055de8a 100644
--- a/packages/components/src/components/tab-panel/tab-panel.lite.tsx
+++ b/packages/components/src/components/tab-panel/tab-panel.lite.tsx
@@ -25,13 +25,13 @@ export default function DBTabPanel(props: DBTabPanelProps) {
// jscpd:ignore-end
return (
-
{props.content}
{props.children}
-
+
);
}
diff --git a/packages/components/src/components/tabs/tabs.lite.tsx b/packages/components/src/components/tabs/tabs.lite.tsx
index 41d5c5ea05e..96ff81e6a43 100644
--- a/packages/components/src/components/tabs/tabs.lite.tsx
+++ b/packages/components/src/components/tabs/tabs.lite.tsx
@@ -65,7 +65,9 @@ export default function DBTabs(props: DBTabsProps) {
if (ref) {
const childTabLists = ref.getElementsByClassName('db-tab-list');
if (childTabLists?.length > 0) {
- const firstTabList = childTabLists.item(0);
+ const firstTabList = childTabLists
+ .item(0)
+ .querySelector('ul');
if (firstTabList) {
if (
!firstTabList
@@ -79,11 +81,10 @@ export default function DBTabs(props: DBTabsProps) {
}
if (props.behaviour === 'arrows') {
- const container = firstTabList.querySelector('ul');
- state.scrollContainer = container;
- state.evaluateScrollButtons(container);
- container.addEventListener('scroll', () => {
- state.evaluateScrollButtons(container);
+ state.scrollContainer = firstTabList;
+ state.evaluateScrollButtons(firstTabList);
+ firstTabList.addEventListener('scroll', () => {
+ state.evaluateScrollButtons(firstTabList);
});
}
}