Skip to content

Commit

Permalink
Merge pull request #18354 from Daraphista/next
Browse files Browse the repository at this point in the history
UI: Fix sidebar a11y by moving aria-expanded attribute to button
  • Loading branch information
kylegach committed Jun 28, 2022
2 parents 86c5f5d + 0e2988c commit 8519d51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ui/src/components/sidebar/Tree.tsx
Expand Up @@ -190,7 +190,6 @@ const Node = React.memo<NodeProps>(
data-ref-id={refId}
data-item-id={item.id}
data-nodetype="root"
aria-expanded={isExpanded}
>
<CollapseButton
type="button"
Expand All @@ -199,6 +198,7 @@ const Node = React.memo<NodeProps>(
event.preventDefault();
setExpanded({ ids: [item.id], value: !isExpanded });
}}
aria-expanded={isExpanded}
>
<CollapseIcon isExpanded={isExpanded} />
{item.renderLabel?.(item) || item.name}
Expand Down

0 comments on commit 8519d51

Please sign in to comment.