Skip to content

Commit

Permalink
Revert "Add aria-selected value to ActionList.Item." (#3784)
Browse files Browse the repository at this point in the history
* Revert "Add aria-selected value to ActionList.Item. (#3579)"

This reverts commit 66482a7.

* Create wise-boxes-peel.md

* Update wise-boxes-peel.md
  • Loading branch information
radglob authored Oct 9, 2023
1 parent 8356ec9 commit 6f4fe7d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .changeset/wise-boxes-peel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@primer/react": patch
---

Revert "Add aria-selected value to ActionList.Item."

<!-- Changed components: ActionList -->
1 change: 1 addition & 0 deletions src/ActionList/ActionList.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ function SingleSelectListStory(): JSX.Element {
key={index}
role="option"
selected={index === selectedIndex}
aria-selected={index === selectedIndex}
onSelect={() => setSelectedIndex(index)}
disabled={project.disabled}
>
Expand Down
1 change: 0 additions & 1 deletion src/ActionList/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ export const Item = React.forwardRef<HTMLLIElement, ActionListItemProps>(
ref={forwardedRef}
sx={merge<BetterSystemStyleObject>(styles, sxProp)}
data-variant={variant === 'danger' ? variant : undefined}
aria-selected={containerProps.role === 'option' ? selected : undefined}
{...containerProps}
{...props}
>
Expand Down

0 comments on commit 6f4fe7d

Please sign in to comment.