Skip to content

Commit

Permalink
fix(ConditionBuilder): correct role for NON HIERARCHICAL_VARIANT (#6117)
Browse files Browse the repository at this point in the history
  • Loading branch information
amal-k-joy committed Sep 25, 2024
1 parent 5b58d50 commit 6c7823e
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,18 +191,18 @@ const ConditionBuilderContent = ({
</Button>
);
}
const wrapperRole =
variant === HIERARCHICAL_VARIANT
? { role: 'treegrid', 'aria-label': conditionBuilderHierarchicalText }
: null;

return (
<>
<Section className={`${blockClass}__heading`} level={4}>
<Heading>{conditionHeadingText}</Heading>
</Section>

<div
className={`${blockClass}__content-container`}
role="treegrid"
aria-label={conditionBuilderHierarchicalText}
>
<div className={`${blockClass}__content-container`} {...wrapperRole}>
{rootState &&
rootState?.groups?.map((eachGroup, groupIndex) => (
<div key={eachGroup.id} className={`${blockClass}__group-wrapper`}>
Expand Down

0 comments on commit 6c7823e

Please sign in to comment.