Skip to content

Commit 3a5a40b

Browse files
authored
Merge pull request storybookjs#31491 from candrepa1/candrepa1/fix-ariaControls-accesibility
Core: Fix aria-controls attribute on sidebar nodes to include all children
2 parents cd6d5b7 + 6da6852 commit 3a5a40b

File tree

1 file changed

+1
-1
lines changed
  • code/core/src/manager/components/sidebar

1 file changed

+1
-1
lines changed

code/core/src/manager/components/sidebar/Tree.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ const Node = React.memo<NodeProps>(function Node({
416416
<BranchNode
417417
id={id}
418418
style={color ? { color } : {}}
419-
aria-controls={item.children && item.children[0]}
419+
aria-controls={item.children && item.children.join(' ')}
420420
aria-expanded={isExpanded}
421421
depth={isOrphan ? item.depth : item.depth - 1}
422422
isComponent={item.type === 'component'}

0 commit comments

Comments
 (0)