diff --git a/.changeset/wise-boxes-peel.md b/.changeset/wise-boxes-peel.md new file mode 100644 index 00000000000..406b91a61d1 --- /dev/null +++ b/.changeset/wise-boxes-peel.md @@ -0,0 +1,7 @@ +--- +"@primer/react": patch +--- + +Revert "Add aria-selected value to ActionList.Item." + + diff --git a/src/ActionList/ActionList.test.tsx b/src/ActionList/ActionList.test.tsx index 5613411dda3..cd2cf3219b9 100644 --- a/src/ActionList/ActionList.test.tsx +++ b/src/ActionList/ActionList.test.tsx @@ -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} > diff --git a/src/ActionList/Item.tsx b/src/ActionList/Item.tsx index 95266c130e9..80e43b3df6a 100644 --- a/src/ActionList/Item.tsx +++ b/src/ActionList/Item.tsx @@ -220,7 +220,6 @@ export const Item = React.forwardRef( ref={forwardedRef} sx={merge(styles, sxProp)} data-variant={variant === 'danger' ? variant : undefined} - aria-selected={containerProps.role === 'option' ? selected : undefined} {...containerProps} {...props} >