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 authored and shilman committed Jul 26, 2022
1 parent b220097 commit b9f3690
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 b9f3690

Please sign in to comment.