diff --git a/src/Panel.tsx b/src/Panel.tsx index 5fbca54..379202b 100644 --- a/src/Panel.tsx +++ b/src/Panel.tsx @@ -83,11 +83,11 @@ const CollapsePanel = React.forwardRef((prop 'aria-disabled': disabled, onKeyDown: handleKeyDown, style: styles.header, + role: accordion ? 'tab' : 'button', }; if (!collapsibleHeader && !collapsibleIcon) { headerProps.onClick = handleItemClick; - headerProps.role = accordion ? 'tab' : 'button'; headerProps.tabIndex = disabled ? -1 : 0; }